Installing ArrayFire python bindings with Canopy (MacOS X Sierra) - enthought

I have installed ArrayFire and am trying to get it working within Canopy. I followed these instructions and entered
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
in a Canopy terminal (launched using the 'Tools' menu). Directory /usr/local is the one where ArrayFire libraries are:
ls /usr/local/lib/libaf*
/usr/local/lib/libaf.3.4.2.dylib
/usr/local/lib/libafcpu.3.4.2.dylib
/usr/local/lib/libafcuda.3.4.2.dylib
/usr/local/lib/libafopencl.3.4.2.dylib
/usr/local/lib/libaf.3.dylib
/usr/local/lib/libafcpu.3.dylib
/usr/local/lib/libafcuda.3.dylib
/usr/local/lib/libafopencl.3.dylib
/usr/local/lib/libaf.dylib
/usr/local/lib/libafcpu.dylib
/usr/local/lib/libafcuda.dylib
/usr/local/lib/libafopencl.dylib
After pip-installing arrayfire in the terminal, running python and trying
import arrayfire
does not work:
RuntimeError: Could not load any ArrayFire libraries.
Please look at https://github.com/arrayfire/arrayfire-python/wiki for more information.
I tried instructions in this post and also this one from Enthought support and created the following file ~/Library/LaunchAgents/environment.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>my.startup</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>
launchctl setenv DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH:/usr/local/lib
</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
without success.
Doing the same in a non-Canopy python is working ok, arrayfire can be imported.
Any idea?

Related

Is there any support for using Facebook SDK (app events to be specific) in Flutter?

I would like to add the Facebook app-events to my Flutter project: https://developers.facebook.com/docs/app-events/android https://developers.facebook.com/docs/app-events/ios
May I know should Flutter users implement their plugin to use the Facebook features?
You can integrate Facebook app events using this package called facebook_app_events(null-safety).
Android Setup:
STEP 1: goto your_project\android\app\src\main\res\values create a new file called strings.xml (if you don't have any already)
In the strings.xml file just paste this
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="facebook_app_id">[APP_ID]</string>
</resources>
Don't forget to replace [APP_ID] with the original APP_ID you got from Facebook e.g
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="facebook_app_id">1234567890</string>
</resources>
STEP 2: goto your_project\android\app\src\main\AndroidManifest.xml and paste this under your app <application> open tag
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
Android setup done.
iOS setup:
goto one_app\ios\Runner\info.plist file and add
If your code does not have CFBundleURLTypes, add the following just
before the final </dict> element:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb[APP_ID]</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>[APP_ID]</string>
<key>FacebookDisplayName</key>
<string>[APP_NAME]</string>
If your code already contains CFBundleURLTypes, insert the
following:
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb[APP_ID]</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>[APP_ID]</string>
<key>FacebookDisplayName</key>
<string>[APP_NAME]</string>
iOS setup is done
NOTE: don't forget to add the package to your pubspec.yaml file
dependencies:
facebook_app_events: ^0.12.0
So far, you can find the facebook_app_events package at pub.dev which is very good. Note that (at the time of writing this answer) the package doesn't support null safety, so you should use it with Dart 2.11 and lower.
There are no official packages from Facebook yet.

build failed Could not determine generated file paths for Core Data code generation when merging code manually

Hello i am new with iOS development i have faced problem when merging library code with application code manually
i have made all the solutions inside stackoverflow with no luck
when trying to build the project the following message is showing
"Could not determine generated file paths for Core Data code generation: No current version for model at path .xcdatamodeld: (in target 'app-Project')"
*i have made clean and rebuild
*i have made new version model by clicking on the .xcdatamodeld file and click on editor>add model version
*i have added the following xml code also
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>_XCCurrentVersionName</key>
<string>app-Project.xcdatamodel</string>
</dict>
</plist>
any idea what else i can do?

Error, no entitlements found in bundle " "

Please can someone assist me!
I archived my app, and I get this error:
ERROR ITMS-9000 "Missing code signing entitlements. No entitlements found in bundle "com...."
for executable.
How can I resolve this?
Thank you.
I was having this very problem, due to a recently-introduced automated build script. The script was codesigning the resultant app bundle manually and it turned out I needed to explicitly reference an entitlements file in the codesigning step:
/usr/bin/codesign --force --sign "$CERTIFICATE" --identifier "$BUNDLE_ID" --entitlements Entitlements.plist Payload/${BUNDLE_NAME}.app
The Entitlements.plist file is pretty standard:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>get-task-allow</key>
<false/>
<key>application-identifier</key>
<string>fully-qualified bundleid</string>
<key>keychain-access-groups</key>
<array>
<string>fully-qualified bundleid</string>
</array>
</dict>
</plist>

update version in settings bundle fails iphone

I am trying to write a run script that updates version in Root.plist.
This is the script
version=/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString"
$SRCROOT/AppName/AppName-Info.plist /usr/libexec/PlistBuddy
"$SRCROOT/AppName/Settings.bundle/Root.plist" -c "set
PreferenceSpecifiers:1:DefaultValue $version"
Root.plist in settings bundle is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList- 1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Title</key>
<string>About</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<string>1.0.24</string>
<key>Key</key>
<string>version_preference</string>
<key>Title</key>
<string>Version</string>
<key>Type</key>
<string>PSTitleValueSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>
</dict>
</plist>
I have followed instructions from this answer. The version number updates successfully when I create the .ipa and I can see the new version in itunes. But when I try to upgrade the app, device shows '1 item could not be synced. See iTunes for more information'. However if the older app on phone is deleted and a fresh install is made the app installs successfully and correct version appears in phone settings.I am using xcode 4.5.2
Could anyone please help
The following script works to insert the current subversion revision number into our plist:
G_VERSIONRP="`/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" ${TARGET_BUILD_DIR}/${INFOPLIST_PATH}`"
G_BUILDRP="`svnversion -n`"
G_TITLERP="MyApp v"
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:0:Title ${G_TITLERP}${G_VERSIONRP} (${G_BUILDRP})" ${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Settings.bundle/Root.plist
I tried again a few days later, used the script and did a clean build. Replaced existing copy in iTunes, synched, it worked!! The only step not same as previous attempt was, earlier I had deleted existing copy in iTunes library and dragged in the new one. Not very sure if that was causing the '1 item could not be synced. See iTunes for more information' message but now the correct version does appear in phone settings.

Xcode 4.0 validation error CFBundleVersion

I am trying the Update my iPhone/iPad Application which I had created in Xcode 3.x version.
I have added CFBundleVersion and the other in my Info.plist and I have crossed checked every thing but I am still getting the error which is following below.
This Bundle is Invalid. The Info.plist file is missing the required key: CFBundleVersion (1091)
I am getting it again and again and I have checked the CFBundleVersion which is already in my Info.plist file.
Please help me out
Thanks
Following below is the Info.plist file. I have crossed check it several times
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleDocumentTypes</key>
<array/>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIconFiles</key>
<array>
<string>icon-57.png</string>
<string>icon-72.png</string>
<string>icon-144.png</string>
</array>
<key>CFBundleIdentifier</key>
<string>com.my-irc</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.5</string>
<key>CFBundleSignature</key>
<string>coRC</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>Internet Relay Chat Server</string>
<key>CFBundleURLSchemes</key>
<array>
<string>irc</string>
<string>ircs</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1</string>
<key>CQBuildType</key>
<string>personal</string>
<key>LSMinimumSystemVersion</key>
<string>3.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MVChatCoreCTCPVersionReplyInfo</key>
<string>http://colloquy.mobi</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIRequiresPersistentWiFi</key>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UTExportedTypeDeclarations</key>
<array/>
<key>UTImportedTypeDeclarations</key>
<array/>
</dict>
</plist>
I had the same problem. I solved it this way. In XCode 4.2 click on the Target. In the summary section, you will see a version and a build number. If you set them both to the same thing, it works. If you just set the version only and ignore the build field you will get the error. This fixed the problem for me.
Sounds like something went wrong in the transition from 3.x to 4.0 A few things to check:
In the Project Target Build Settings make sure that "Info.plist File" is pointing to the right file.
Check that the Version field in the Project Target Summary is the right value
There should actually be two entries (by default) these days: CFBundleVersion and CFBundleShortVersionString though I doubt that's the issue
Make sure you don't have a space before or after "CFBundleVersion"
Else, you should be able to paste your plist here. In Xcode right-click on the plist file and choose Open As > Source Code. That'll give you the raw-xml that you can paste into your question (edit your question to update it).
In my case the CFBundleVersion is composed of the subversion working copy revision number on build. This is done by a script that is found under:
Target -> Build Phases -> Run script
After checking the build log it turns out that the subversion binaries Xcode uses are different from the ones I use on the command line (MacPorts version). The received error is:
svn: The path '.' appears to be part of a Subversion 1.7 or greater /.../
After modification of the line below:
REV=`svnversion -nc | /usr/bin/sed -e 's/^[^:]*://;s/[A-Za-z]//'`
to:
REV=`/opt/local/bin/svnversion -nc | /usr/bin/sed -e 's/^[^:]*://;s/[A-Za-z]//'`
everything works fine again.
I had that problem too. Here is my solution:
Follow the directions Here
Click Product > Clean
Click Window > Organizer
Click Archives
Click Validate