Working with appcelerator titanium ti.coremotion on ios 8+ - ios8

I am trying to develop a stepcounter using the ti.coremotion module.
I am trying to implement http://docs.appcelerator.com/platform/latest/#!/api/Modules.CoreMotion on devices with ios 8 and 9, but as it says in the doc, this only works for ios 7. I am stuck now. I tried running it on a device with ios8 and it said "Device does not supports step counting".
I tried searching it on google and got this: https://github.com/benbahrenburg/Ti.CoreMotion
which says it is for ios 7+ but works with sdk 3.2 only. What I am working with is sdk 4.1 and I need it as 3.2 will not work for other things.
Any help is appreciated.

I just build an app with SDK 5.0.2.GA to my iPhone 6S running iOS 9.1 and this sample code and it worked fine:
var CoreMotion = require("ti.coremotion");
// This code checks to see if the device can gather step counting data
if (CoreMotion.isStepCountingAvailable()) {
// If it can, it starts the step counter and outputs the data to the console
CoreMotion.startStepCountingUpdates({stepCounts: 1}, function(e){
Ti.API.error(JSON.stringify(e.numberOfSteps));
});
} else {
Ti.API.error('This device does not support counting steps.');
}
What device are you testing on? Does it work for you on a device running iOS 9?
If you have reproducible code/steps/environment then please create a JIRA ticket: http://jira.appcelerator.org

Related

Firebase push notification not showing on ios10

I'm using Xcode 7 and developing an app with push notification. However, I found out that all push notifications cannot be shown on iOS 10 devices. Is there any solution to fix it?
P.S. push notification is working fine on iOS 9.
Update to Xcode 8 is compulsory~ Otherwise, push notification would not work on iOS 10
I'm currently having the same issue here.
I believe the problem could be the following:
The Firebase iOS 10 implementation uses the following pre-compiler macro:
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
Well, Xcode 7 works with the iOS 9 SDK so the __IPHONE_OS_VERSION_MAX_ALLOWED's value is __IPHONE_9_3 which is lower then the __IPHONE_10_0's value.
Basically when you build the project with Xcode 7, the iOS 10 Firebase implementation won't be compiled into the application.. Moreover Xcode 7 cannot recognise the UserNotifications framework..
I tried to copy the iOS 10 SDK into Xcode 7's directory but it was a bad idea 😅

App not being started on device

I'm trying to play with NativeScript to create any simple android app. I've done step 1 from NativeScript's 'Getting Started' (setting up my osx environment) and right now, i have a barebones NativeScript app created with tns create and android platform added to it.
When running tns run android everything goes well and the final message before device debug logs (i'm not an android/ios/mobile dev so i assume that it's just some kind of debug log of what's going on connected device) is:
BUILD SUCCESSFUL
Total time: 11 seconds
Project successfully built
Using /Volumes/HDD/Users/michal/Workspace/Sandbox/tns_hello_world/platforms/android/bin/tns_hello_worl d-debug.apk
Successfully deployed on device with identifier '00099fbd72369f'
However, there is nothing going on my device after that. No app is being launched, no error message. Just completely nothing.
My setup is:
OSX 10.9.5
Java 1.8.0_45
Samsung GT-I9100
Android 4.1.2
Have you any idea what am i possibly doing wrong? Thanks in advance.
Your android device is not supported by NativeScript. Use device with Android 4.2 (API level 17) or newer. You can also try it on emulator.
Jan 2019
I verified in Android 8.1, it works fine.
First look, it looks like not working.
However, after changing the text "Play with NativeScript!" to "Hello world" in home.component.html, I could see the text. The homepage message ideally should say this.

app using CLLocationManager and built against ios7 will work on ios8?

I understood that in ios8 CLLocationManager should first ask the users for new specific permissions (Location Services not working in iOS 8)
But if an app using CLLocationManager was built against ios7 (and working properly on ios7 and submitted in the store), will this app work on a ios8 device?
thanks
Yes apps built with iOS 7 SDK using Xcode 5 will work with iOS 8. My apps on Appstore works fine with iOS 8 beta 5. My dev builds created by Xcode 5 also work fine with iOS 8 beta (distributed using TestFlight).
I have app that is currently on store that uses CLLocationManager and was built for iOS7. It works fine when installed on iOS8 device. But, i have a problem with new version of the app. I made some new features, didn't touch anything related to CLLocationManager, and when I build that new version with iOS7 SDK locations don't work on iOS8 device, while it still works fine on iOS7 devices.
Is there something special that I have to set up in the environment to make it work?

Setting a twitter account in the iphone simulator

I'm developing an iOS application, and to be able to retrieve data from Twitter, i need to set my Twitter account via Settings in the simulator to use Twitter framework. Even if i type my username and password correctly, it gives an error telling that username or password is invalid , but i'm 100 % sure that they are correct , because i'm using on the web. I'm able to access my Twitter account. The other weird issue that i'm facing this problem while using iphone 5.0 simulator. No problem with iphone 6.0 simulator. It drives me crazy, lookep up on the web, but nothing came up. Do you guys any idea why i'm having this problem ?
Edit: I'm using Xcode 4.5.2 and iOS 6.0 on Mountaion Lion
Do you use Xcode 4.6 Developer Preview 2? This is a known issue:
When using the iOS 6.1 SDK on OS X v10.8 (Mountain Lion), if you use
the iOS 5.0 or iOS 5.1 “Legacy SDK” in iOS Simulator, you will not be
able to sign in to Twitter via the Settings pane and Twitter.framework
will not work correctly. If you need to test Twitter features, you
will need to choose either the iOS 6.1 or iOS 6.0 Simulator run
destination or test with iOS 5.x on a device. These problems do not
occur when running Simulator on OS X v10.7 (Lion).
I had a code done in Xcode 8.3.3 that I code look up tweets on a hashtag. I used the twitter built in Social app to login there then test my app. An update with Xcode 9.2 is that you cannot use the built in social apps like before in Xcode 8.X.X.
iOS 11 no longer supports using Twitter from the built-in social framework.
The solution is that you have to use Twitter Kit 3 to use Twitter features in your app like Tweet, Social Twitter login, and access or use any Twitter API.
link to twitter kit iOS:
https://github.com/twitter/twitter-kit-ios/wiki

How can I get UDID using liblockdown.dylib?

I try to get the UDID without using the UIDevice class but directly from implementing the dynamic library liblockdown.dylib on iOs 4.2. I don't find any documentation. All I need is to get the kLockdownUniqueDeviceIDKey, what should I do ?
I don't know about iOS 4, but I know that the UDID can also be retrieved on iOS 5, 6 and 7 using the libMobileGestalt.dylib. More information about this library can be found on the iPhone Development Wiki.
Here is the header for the liblockdown.dylib
here implementation:
https://github.com/theiostream/lockdown-uiduid/blob/master/main.mm
This code work on iOS 6.1.3 but it does not work on iOS 7b2 :(

Resources