Open shoaoki-arent opened 1 month ago
Hi are you able to compile? I am not able to compile even.
@shoaoki-arent
this is the output i am getting on Xcode 15.
A shell task (/usr/bin/xcrun lipo -create /Users/sourabhsingh/Library/Caches/org.carthage.CarthageKit/DerivedData/15.2_15C500b/Eureka/5.5.0/Build/Intermediates.noindex/ArchiveIntermediates/Eureka/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Eureka.framework/Eureka /Users/sourabhsingh/Library/Caches/org.carthage.CarthageKit/DerivedData/15.2_15C500b/Eureka/5.5.0/Build/Products/Release-iphonesimulator/Eureka.framework/Eureka -output /Users/sourabhsingh/Documents/NEWSDK/19june2024/INSCameraSDK/Carthage/Build/iOS/Eureka.framework/Eureka) failed with exit code 1: fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/sourabhsingh/Library/Caches/org.carthage.CarthageKit/DerivedData/15.2_15C500b/Eureka/5.5.0/Build/Intermediates.noindex/ArchiveIntermediates/Eureka/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Eureka.framework/Eureka and /Users/sourabhsingh/Library/Caches/org.carthage.CarthageKit/DerivedData/15.2_15C500b/Eureka/5.5.0/Build/Products/Release-iphonesimulator/Eureka.framework/Eureka have the same architectures (arm64) and can't be in the same fat output file
Building universal frameworks with common architectures is not possible. The device and simulator slices for "Eureka" both build for: arm64
Please ignore my comments I am able to successfully run the example app.
@sssuourabh Thank you for your comment. I found it difficult to run the sample app, so I decided not to proceed with it. I already have an older version of the INSCameraSDK embedded in my app, so I thought it would be sufficient to just replace it.
By the way, the sample app seems to be embedding a .framework
instead of an .xcframework
, so I don't think it provides any hints for solving the second point in my comment.
@shoaoki-arent actually i figured out how to run the sample app. I haven't used in my app till now. if you need any help on running the sample app drop me a message. Thanks
@sssuourabh Thank you very much.
When you have some time, could you please let me know what you did to get the sample app running? I'm sure it will be helpful to others as well.
Here’s what I have done so far:
I tried fixing the path to the framework in the Frameworks directory (I couldn't find NSLogger.framework).
After that, I'm encountering the following error with Eureka. It might be because I am using Xcode 15.2. However, this is the result of testing on a simulator, and the result may be different on a real device.
Compiled module was created by a different version of the compiler '5.9.0.128.108'; rebuild 'Eureka' and try again: /Users/{username}/Library/Developer/Xcode/DerivedData/INSCameraSDKSample-bluetooth-bnxikozjplyitngpcnkyktrpwnet/Index.noindex/Build/Products/Debug-iphoneos/Eureka.framework/Modules/Eureka.swiftmodule/arm64-apple-ios.swiftmodule
Hi, Please follow these steps - In cartfile please update this - binary "https://ios-releases.insta360.com/INSCoreMedia.json" == 1.25.30 github "xmartlabs/Eureka" ~> 5.5
after that go to folder and run carthage update --use-xcframeworks
Just select the framework here and map to right address in right pane selecting the file. Go to build phase and check there is duplicate file addition of appdelegate and NSData+Hex remove them.
Ensure this in embed frameworks in build phase
Hi @shoaoki-arent! I also have Xcode 15.2. As @sssuourabh suggested, you need to update the Cartfile. I also noticed that you have both INSCoreMedia.xcframework and INSCoreMedia.framework. You only need one of them. I removed NSLogger.framework entirely, and everything compiles for me.
@sssuourabh @ravilich86 Thank you very much. I appreciate both of your assistance. I successfully managed to build on the actual device. I was struggling with errors, but after extracting the sample project again and starting over from the beginning, it worked out perfectly. Thank you for the wonderful tip!
P.S. I understand that it is pointless since we are working with an real camera, but when trying to build on the simulator, I encountered an error in INSCameraSDK.xcframework indicating something like "no build for the simulator." Therefore, I have given up on running it on the simulator.
@shoaoki-arent To have a universal framework, you'd need to build another simulator target. This can be an empty target in Xcode with sdk set to iphonesimulator
. Then, you'd have to create a new xcframework
from both architecture.
The resulting xcframework
should contain these files:
Info.plist
ios-arm64
ios-arm64_x86_64-simulator
Although I wish Insta360 would just provide a proper INSCameraSDK.xcframework
and INSCoreMedia.xcframework
with universal architecture for us 😄
@jessearmandse Thank you for the information. Does it actually work in the simulator, or is it solely intended to ensure a successful build?
It's just to ensure a successful build. I guess you could also just link it on Apple Silicon machine, and bypass the simulator entirely.
hi @jessearmandse can you please provide more info on this - https://github.com/Insta360Develop/CameraSDK-iOS/issues/40#issuecomment-2185851367 Need to create a fat binary to build on ios simulator also. @shoaoki-arent @kelvinhkw @capjason
I have integrated the Framework from what appears to be the latest SDK version, INSCameraSDKSample-3.0.4_403, into my project. Upon building, I encountered the following issues. Could these issues be specific to my environment?
Previously, I used INSCameraSDK.xcframework and INSCoreMedia.framework from INSCameraSDK-SampleOC-2.9.43_388, and these warnings were not present. Also, INSCoreMedia is a framework, not an xcframework.