Framework support in 8.4

Should this be working ?

Its now linking but when I run the app I get

dyld: Library not loaded: @rpath/Realm.framework/Versions/A/Realm
  Referenced from: /Users/JohnMoshakis/Documents/develop/Nougat/RealmExample/RealmExampleCocoaApplication/bin/Debug/OS X/RealmExampleCocoaApplication.app/Contents/MacOS/RealmExampleCocoaApplication
  Reason: image not found
!> Fatal exception on thread 2be29ed 
!> Type: (null) 
!> Message: EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0) 

Cheers,
John

For now, you’ll need to manually take care of getting the .framework copied into the app bundle via an appResource. I’ll look at getting this fixed soon.

We’re working on this now. Mean time though, I see Realm has a static version of the framework? That one should work now?

I had forgotten how to use appResources. I added icons to a project recently but I couldn’t remember how I did it.

I know it links, I’m using the static version at the moment and I wanted to work on my iphone app so I was going to wait until you made your changes.

Will the changes be in the next release ?

Depends on whether I get around to doing the msbuild/macpack side of the change before Friday. I’m a bit under the weather this week, so I might not. If not, next week.

Any ideas on when this might be working ?

I tried with the latest and at runtime its the same error.

Thanks,
John

hmm. this should be working in the latest.

This is the example I have been using. Its both osx and ios

https://drive.google.com/file/d/0B2BI2X_qYLQBLUJzaUt0MDZMczA/view?usp=sharing

Thanx, and sorry for the delay. I’ll have a look.

Side question, how did you add this reference? DO references still get added as absolute paths for you, when you drag them in, even though the paths are close by? Fwiw, i simply re-dragged the file in and it got added with a proper relative path:

        <Reference Include="Realm">
            <HintPath>..\FX\Realm\OS X\Realm.fx</HintPath>
        </Reference>

here. If that doesn’t happen for you, i’d like to narrow that down further (unrelated to the framework issue ofc)

thanx,
marc

Turns out, your .fx file doesn’t have the proper flag set. Could be a bug in the importer script, or that you did something wrong .

Can you send me the files and the script you used to generate it?

The project is really old so I would of added the reference before you fixed the bug. I re-added and it sets the reference relative.

This is the train script I used.

libRealmFramework.train.zip (642 Bytes)

The HeaderImporter folder it references is obtained from fxgen.

hmm. could it be you also generate the fix long before this was fully working, then? ;). in any case, i’ll have a look later today and reimport it, to see if all works then or if the error persists. thanx!

I don’t think so. I regenerated the fx with the latest beta.

Odd, i just reimported the frameworks, and they now have a flag set that is necessary for them to be bundled that your import did not. That said, it still doesn’t quite work, and we need to do some more fixes, but the .fx you had was definitely not correction top of that.

Our of curiosity, can you rerun the import and paste the log? in particular, is the --copyframework switch being passed to HI.exe for the iOS framework?(it was here, out of the box, and this scripts had not changed in a couple months; the corresponding flag is set in the FX i generated, but it was not in yours — only explanation i can think of is you have a (very) old HI.exe or old generate.train script. I’d like to narrow that down, JIC.

In any case, we’l hope fully be able to ix the rest monday, for next friday’s beta.

fwiw, this is tracked under bugs://74881: HI/FXGen: proper .framework support

thanx!

john.txt (8 KB)

That’s the log. I did notice my script is still pointing at the Nougat Libraries folder. I’ll blow everything away and try again.

To get headerimport and generate.train I used crossbox.zip from the current beta build. and extracted fxgen to get the files.

I’ll try with todays build and see if that makes a difference.

curious. --copyframework is there.

I tried with the latest and its working now. Thanks.

1 Like

excellent, thanx for confirming.

I’m not entirely sure but I think there might be problems running on an actual device ?

The loading screen appears and then the app disappears.

If I try and debug I see this in the debug window

Note: No symbols were found for this OS version. Connect your device to Xcode and open the Devices window (⇧⌘2).
~> Process started.
dyld: Library not loaded: @rpath/Realm.framework/Realm
Referenced from: /var/containers/Bundle/Application/A64716D3-5250-44B3-A1E0-F4F74906AE0C/SailingLogiOS.app/SailingLogiOS
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/A64716D3-5250-44B3-A1E0-F4F74906AE0C/SailingLogiOS.app/Realm.framework/Realm: required code signature missing for ‘/private/var/containers/Bundle/Application/A64716D3-5250-44B3-A1E0-F4F74906AE0C/SailingLogiOS.app/Realm.framework/Realm’