kavi
10/07/2021, 2:01 PMassembleXCFramework
– called AnymoCore.xcframework
2. This is then added as a framework to an iOS project (an SDK that I’m creating) which itself produces a framework – called Anymo.framework
3. The final sdk framework is then consumed by apps – currently just a sample/test app
So far my sample app seems to be running fine on the simulator but crashes when trying to run on a device…
dyld: Library not loaded: @rpath/AnymoCore.framework/AnymoCore
Referenced from: /private/var/containers/Bundle/Application/A863B34D-6A54-4D8E-A3A1-69BB07344DE5/iosApp.app/iosApp
Reason: image not found
If i add my xcframework to my test app directly and try to import some code from AnymoCore
(rather than Anymo
) then it works so i think i’m just going wrong at step 2 maybe? I suspect it’s some xcode config or flag that i need to set correctly but am running out of ideas and would appreciate any tips 🙏🏾kavi
10/07/2021, 2:01 PMbuild.gradle.kts
looks like by the way:
val xcf = XCFramework(libName)
ios {
binaries {
framework {
baseName = libName
xcf.add(this)
}
}
}
Big Chungus
10/07/2021, 2:03 PMKarel Petránek
10/07/2021, 2:34 PMBrian G
10/07/2021, 3:11 PMBrian G
10/07/2021, 3:13 PMBrian G
10/07/2021, 3:14 PMkavi
10/07/2021, 3:27 PM@executable_path
and @loader_path
are (which is v likely!)Brian G
10/07/2021, 3:34 PMkavi
10/07/2021, 3:42 PMKarel Petránek
10/07/2021, 3:53 PMkavi
10/07/2021, 4:09 PMKarel Petránek
10/07/2021, 4:28 PMKarel Petránek
10/07/2021, 4:29 PMBrian G
10/07/2021, 4:36 PM@loader_path/Frameworks/Anymo.framework/Frameworks
to the app, and the consumer's would have to do the same. My library is only used internally (by a few dozen apps) so I'm not too concerned with hiding the nesting.kavi
10/07/2021, 4:49 PMkavi
10/07/2021, 5:58 PMBrian G
10/07/2021, 7:28 PMKarel Petránek
10/07/2021, 11:06 PMBrian G
10/08/2021, 1:40 AMKarel Petránek
10/08/2021, 9:02 PM