Not able to run sample heathkit project FitStoreandRetrieveHealthKitData on iPhone - ios8

I have downloaded sample Health-kit app (FitStoreandRetrieveHealthKitData)from apple developer site. Trying to run it on my iPhone with Xcode 6 beta.
But failed to run app on device and getting error
dyld: Symbol not found: _HKQuantityTypeIdentifierDietaryCalories
Referenced from: /private/var/mobile/Containers/Bundle/Application/95F193C0-52CE-47E0-92C4-0BF436AEB3AE/Fit.app/Fit
Expected in: /System/Library/Frameworks/HealthKit.framework/HealthKit
in /private/var/mobile/Containers/Bundle/Application/95F193C0-52CE-47E0-92C4-0BF436AEB3AE/Fit.app/Fit
Can any one has solution for this ?

HKQuantityTypeIdentifierDietaryCalories was renamed to HKQuantityTypeIdentifierDietaryEnergyConsumed. Make sure you're building the project with the version of the iOS 8 SDK that corresponds to the version of iOS 8 you have installed on your iPhone.

Related

dyld: Symbol not found: _vmnet_shared_interface_name_key

After trying to run the Emulator form Android Studio, i got the following:
dyld: Symbol not found: _vmnet_shared_interface_name_key
Referenced from: /goinfre/anel-bou/FlutterFolder/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 (which was built for Mac OS X 11.1)
Expected in: /System/Library/Frameworks/vmnet.framework/Versions/A/vmnet
in /goinfre/anel-bou/FlutterFolder/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64.
And after trying to run Android Emulator without using Android Studio i got the following message:
e2r7p15% /goinfre/anel-bou/FlutterFolder/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 ; exit;
dyld: Library not loaded: #rpath/libQt5WebEngineWidgetsAndroidEmu.5.12.1.dylib
Referenced from: /goinfre/anel-bou/FlutterFolder/Android/sdk/emulator/qemu/darwinx86_64/qemu-system-x86_64
Reason: image not found
zsh: abort
I am working with macOS Mojave 10.14.6 (that i cant update) and Android Studio Arctic Fox | 2020.3.1 Patch 2
I fixed it by downgrading the Emulator:
Download an old version of emulator (in my case i used emulator-darwin_x64-7425822 download from here)
Replace the emulator folder you downloaded with the one in your sdk folder. (should normally be here ~/Library/Android/sdk)
You can also fix it by upgrading your macOS version to the latest one.

Nativescript: Error Building for iOS Simulator

I have followed the complete install guide for nativescript on a Mac (Big Sur). Also when running tns doctor everything seems fine. However, when i'am running tns build ios or tns run ios i get the following error:
error: Building for iOS Simulator, but the linked and embedded framework 'TNSWidgets.framework' was built for iOS + iOS Simulator. (in target 'projectapp' from project 'projectapp').
Could someone please tell me how to fix this. I installed nativescript 7.0.11 and
x-code 12.3
Yesterday with the Xcode update (12.3) I've got the same error, after seeing a lot of posts about this error the solution from Niko Dovidija IS THE CORRECT ONE.
My environment:
Xcode 12.3
iOS platform 6.5.3
Nativescript 6.7.8
In order to build the application in CLI update build.xconfig in iOS platform and add this line:
VALIDATE_WORKSPACE = YES
Posts about "similar" errors and didn't work for me.
Building for iOS simulator
Building for iOS simulator 'AFNetworking.framework'
So I just updated Xcode to 12.3 today, using nativescript 7.0.11 in my project and I got a simular issue. What worked for me was:
Open the platforms/ios folder using Xcode
Select "yourprojectname.xcodeproj" from the list
Select yourprojectname from the Targets
Expand Build Options and find Validate Workspace
Change to Yes
Rebuild the project
After that, I got a successful build.
Please note that I also needed to run ns platform clean ios command in order to make the build work after updating my Xcode to 12.3

Getting library not found for -lstdc++.6 while building the Mfp 6.3 Iphone App in Xcode 10.1

Getting this error when running any MFP 6.3 app in Xcode 10.1:
Showing All Issues :-1: library not found for -lstdc++.6
:-1: linker command failed with exit code 1 (use -v to see invocation)
The same is working in Xcode 9.0/Xcode 8.0 version.
How this issue can be particularly solved for IBM Mobilefirst 6.3 iPhone Apps. Also, Apple Store is not accepting build made with Xcode 9.0. Also tried MFP 6.3 latest fix but it is not solving the issue.
MobileFirst 6.3 doesn't support iOS 12/Xcode 10 - you should upgrade to MobileFirst 7.1 or 8.0.
Having said that, you can try the solution given in this link ( https://mobilefirstplatform.ibmcloud.com/blog/2018/07/23/mfp-support-for-ios12/#known-issues )
lstdtc++ is deprecated in recent versions. I have faced this issue and it is resolved after following the steps mentioned in https://github.com/Kila2/libstdc-.6.0.9.tbd
Download the Files from Github
1. For simulator to work, copy the files from iPhoneSimulator to path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/"
2. For actual devices to work, copy the files from iPhoneOS to paths as mentioned in the link w.r.t Xcode version.
I did the same and restart XCode. It works post this.

OSX menu bar application not launching when archived and exported, how to debug?

After a big overhaul an OSX application I am building stopped launching after archive->export. It doesn't produce any errors, but doesn't launch at all either. I have tried various signing combinations, and it doesn't seem to be the problem.
The application launches fine when run from xcode.
The application is done in swift and uses cocoapods. It is a menu bar application.
My question is: How do you debug an application that works fine when debugging but not launches at all when archived->exported?
Xcode 7.3
OSX 10.11.5
UPDATE:
When I run the released application from command line it outputs:
Discipline.app/Contents/MacOS/Discipline
dyld: Library not loaded: #rpath/Pods_Discipline.framework/Versions/A/Pods_Discipline
Referenced from: /Users/theisegeberg/Desktop/Discipline 2016-05-24 09-21-14-uns/Discipline.app/Contents/MacOS/Discipline
Reason: image not found
Trace/BPT trap: 5
The problem lay with a combination of cocoapods 1.0.0 and the Realm pod and xcode 7.3. The solution was to update xcode to 7.3.1 and use the downloaded version of the Realm lib.

XCode 6 GM: linker error when building for device (Metal not found)

I'm trying to build my project in XCode 6 GM for device (base SDK version is 7.1), and I get linker error:
ld: framework not found Metal for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The same project builds perfectly in XCode 5 without any changes in project settings. (Also, build in XCode 6 for simulator succeeds.)
I'm building with SDK 7.1, why is XCode 6 trying to link to Metal anyway?
Having the same problem. I am able to build the app fine in Xcode 6 pointed to the simulator or a phone, but when archiving I get this error. I am using the iOS 7.1 SDK.
I am using cocoapods and found that I can fix the problem by either setting the 'Link Frameworks Automatically' to NO for the pods project, or by archiving while there is a device plugged in and the scheme is targeted to a device not just 'iOS Device.'
This is a problem caused by Xcode 6's default project build settings.
Edit: Here is another explanation of this solution: http://www.appsee.com/blog/dev/xcode-new-link-frameworks-automatically-fix-framework-not-found-metal-for-architecture-armv7
I had the same problem in a code base building fine iOS 8.0 SDK (Xcode 6.0.1) and having this issue with iOS 7.1 SDK (though in Xcode 5.1.1). There seem to be a lot of different project having this problem. See here for more details.
What fixed the issue for me was going to my targets 'Build Phase'-settings, 'Link Binary with Libraries' and there removing and re-adding the CoreVideo.framework, 'Product > Clean', a finally the 'Product > Run'.
Using the iOS 7.1 SDK with Xcode 6 is not a supported configuration. The linker is behaving correctly here. The 7.1 SDK doesn't contain Metal.framework to link against, and you have requested to link against Metal.framework. You need to use the iOS 8.0 SDK or later to use Metal.framework.

Resources