Google Maps works in simulator but not in device - ios

Google Maps works in iPhone simulator, when I run my project on device, it is not working.
Here is error description:
CoreData: Failed to load optimized model at path
'/var/mobile/Containers/Bundle/Application/01B85FB4-C777-467D-9E61-92B4B3240B91/demo/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo'

Add -ObjC to "Other Linker Flags"
(Build Settings -> Linking -> Other Linker Flags).
This solved it for me.
After I added this flag I received some errors regarding missing symbols (such as _CBAdvertisementDataManufacturerDataKey).
I added the Accelerate and CoreBluetooth frameworks in Build Phases -> Link Binary With Libraries.

try this link please see https://code.google.com/p/gmaps-api-issues/issues/detail?id=8524 for information about debugging
This has been fixed in 1.10.4.

Related

Injection III : Interposable conflict with BitCode

I am using InjectionIII for code injection on Xcode 11.5 and MacOS 10.15.2. Setup guide says
To use injection, download the app from the App Store and run it. Then, you must add "-Xlinker -interposable" to your project's "Other Linker Flags" for the Debug target (qualified by the simulator SDK to avoid complications with bitcode).
I added flag as shown in screen shot, It runs fine on Simulator but for Device I get this error.
-interposable and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
There is something wronng the way I have setup flags but I can't figure it out.
Currently InjectionIII can only work on simulators1. So you may want to specify "Other Linker Flags" only for simulators to prevent build error. Click the "+" icon in your image to select a target2:

Unable to run my app on iOS 13. For a framework problem

I'm trying to test my project on my iPhone with iOS 13, using Xcode 12 beta 6.
The app crash on start and this is the message in the log:
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib:/usr/lib/libMTLCapture.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
(lldb)
Someone can help me?
Thank you
This occurs because Xcode fails to sign the frameworks that are provided by SwiftPM with your app’s signing identity. It’s a known issue (SR-13343) in Xcode 12.
You can do these steps on third framework file to try fix :
select:Siging & Capabilites.
find : FrameWorks, Libraries, and Embedded Content.
change : the. "embed" of the third frameworks from "Do not Embed" to "Embed & Sign".
Go to Project Settings -> Target -> General -> Frameworks, Libraries, and Embedded Content -> Check that your custom framework has "Embed & Sign" option
add AppTrackingTransparency.framework to your project
In my case, I made a SPM framework and embedded then occurred this error.
I unchecked "Copy only when installing" in Build Phase of Embed Frameworks then works fine
you can also check this
Stripe iOS SDK via Swift Package Manager is installing, but crashing because "Library not loaded"
Don't Copy the Framework directly to your project. Adding 'Embed Pods Frameworks' manually works for me. Try It.
If you are asking permission for tracking via AppTrackingTransparency, you must addNSUserTrackingUsageDescription key to the info plist.

SIGABRT error loading app to iPhone after successful build and past successful deployment

I built an iOS app using Xcode 9 and deployed successfully onto iPhone X running iOS 11.4, but since updating iPhone to iOS 12 and Xcode updated to 10 my app builds successfully but then I get a SIGABRT error stating:
dyld: Library not loaded: #rpath/libswiftAVFoundation.dylib
Referenced from: /private/var/containers/Bundle/Application/3C7010B7-BC26-4638-AEAF-E3F45108826C/PaintingPortal.app/Frameworks/OmniVirtSDK.framework/OmniVirtSDK
Reason: image not found.(lldb)
I've done the following to try and resolve this:
I checked that OmniVirtSDK.framework is listed in frameworks folder.
I added to Runpath Search Paths to include $(inherited) and #executable_path/Frameworks.
I checked OmniVirtSDK.framework is listed in Embedded Binaries.
I checked OmniVirtSDK.framework is listed in Linked Frameworks and Libraries.
(I removed and added both of these to be sure they were valid attributes).
I re-ran clean and build several times.
I deleted the DerivedData folder, then clean and build as well.
I ensured AVFoundation.framework was listed above OmniVirtSDK.framework in the frameworks list and also in the Linked Frameworks and Libraries lists, in case order was relevant.
I ensured "Other Code Signing Flags" under Signing was blank.
I ensured "Other Linker Flags" under Linking included '_ObjC'.
I ensured "Strip Swift Symbols" under Deployment was set to 'No'.
All of these were the advice on any related forum entries that I could find, so I now need help to understand what to do to resolve the issue and obtain a successful app launch on my test device.

Parse and AdMob in One iOS Binary?

Has anybody been able to compile and link Parse and AdMob in One iOS Binary?I get linker errors either from Parse or from AdMob depending on build settings.
Your help is much appreciated.
AdMob requires the -ObjC linker flag :"This flag causes the linker to load every object file in the library that defines an Objective-C class or category".
Parse has removed the Facebook SDK from its framework which generates the linker errors when the project is compiled with the -ObjC flag that AdMob requires.
I don't know of a way around AdMob's dependence on the -ObjC flag. I'm not a linker guru.
The solution Parse recommends is to add the Facebook SDK to your project. I don't know of a workaround to this either if you don't plan to use Facebook.
Parse has a support discussion here: https://www.parse.com/questions/i-dont-want-to-use-facebook-in-my-app
Update: I tried replacing -ObjC linker flag with -forceload of the AdMob library. However, I got the AdMob crash. It's the same one you get with the missing -ObjC linker flag. Any linker experts know how to replace the -ObjC with something that targets only the AdMob library?
Update 2: I needed to revisit this after upgrading to XCode 6, iOS 8, and a new version of adMob. I got it to work by using this -force_load:
-force_load $(SRCROOT)/.../GoogleMobileAdsSdkiOS/libGoogleAdMobAds.a
In my case, I have adMob installed inside of subfolders of my project source. Just substitute ... with your relative path to the adMob SDK.
Looks like following flag solve the problem:
-force_load Libraries/GoogleAdMobAdsSdkiOS-6.8.0/libGoogleAdMobAds.a

Upgrading Google Mobile Ads iOS SDK from 5.0.5 to 6.4.2 results in linker errors

I have an existing iOS app that is using Google Mobile Ads SDK (v 5.0.5, I believe). I need to upgrade it to the latest version for DoubleClick support. However, I'm getting linker errors.
My steps were as follows:
Remove file references for previous SDK from project
Remove previous libGoogleAdMobAds.a linked library
Follow the setup instructions (to the letter, including the required frameworks, including only the specific files, as well as adding the Other Linker Flag)
The specific error is:
Undefined symbols for architecture i386:
"_CGSizeFromGADAdSize", referenced from
or
"_kGADAdSizeBanner", referenced from
What else am I missing?
Maybe you need the -all_load linker flag option too? According to this article it's obsolete for newer ARM7 targets, but perhaps you have an old target?
http://vntin.com/feeds.feedburner.com/blogspot/LTiVe
See under this section: "Support for armv7s"
"If you’re targeting the armv7s architecture, you will not need to add the -all_load linker flag to your projects anymore. "
[Update]
You can try to verify what's in the lib*.a file by using the nm command.
nm -U libGoogleAdMobAds.a | grep kGADAdSizeBanner
Also, clicking on the Log Navigator may provide some additional information. Select the last icon then your last build in the left nav.
[Update 2]
Someone on this site also complained about a linker problem with the new API. Might have to make small changes to your code.
http://www.monkeycoder.co.nz/Community/posts.php?topic=1246
Something has changed in the latest AdMob SDK. I get the same linker error. I can use an older version of the SDK and this all works fine. Anyone know what could have changed with Ad sizes?
EDIT: Found the problem. There were some name changes to constants :)
https://developers.google.com/mobile-ads-sdk/docs/ios/intermediate
Change the GAD_ ad sizes with:
kGADAdSizeBanner.size.width and kGADAdSizeBanner.size.height

Resources