I want to use CMMotionActivityManager, I would like to know what devices motion data is available on? Many of the places that i have read suggest that it is currently only on devices that have the M7 chip.
https://developer.apple.com/library/ios/documentation/CoreMotion/Reference/CMMotionActivityManager_class/Reference/Reference.html#//apple_ref/occ/cl/CMMotionActivityManager
isActivityAvailable will return true on the M7 equipped devices:
iPhone5S
iPad mini with retina
iPad Air
Apple is not telling implicitly in the documentation, perhaps leaving other implementation options open and allowing the customer to disable the tracking sensor for privacy reasons.
Related
From what I know iPhone 5/5C do not have the motion processor like 5S and newer phones have, but when I request the motion permission the default alert with Allow and Don't allow still appears, even if I check before if the motion is available for device with MotionManager.isDeviceMotionAvailable. I would expect the alert not to appear for 5 and 5C.
What am I doing wrong here? Does 5 and 5C actually support motion?
No, you are getting this wrong; isDeviceMotionAvailable detects the presence of a gyroscope and an accelerometer. It's actually available since iOS 4, which came out way before the M7 motion coprocessor inside the iPhone 5s.
From Apple Documentation:
The device-motion service is available if a device has both an accelerometer and a gyroscope.
As #the4kman said the device motion is available through accelerometer and a gyroscope.
But what I actually meant and needed in this case is the user's activity, which is available through the M7 processor that is installed on 5S and newer and to check if that is available on a device I did CMMotionActivityManager.isActivityAvailable()
After searching on Google, I found that people say it's only possible to connect an iOS device with a non iOS device with the 'MFi program'. Is that true?
My project is mainly focused on sending and receiving information with the Arduino device via Bluetooth directly.
Is communication between iOS and non iOS devices without jailbreak possible? If yes, is there a reference?
(I viewed Stack Overflow question How can an iPhone access another non-iPhone device over wireless or Bluetooth?.)
As I stated in the above-linked question, general Bluetooth communication to external devices on non-jailbroken iOS devices is restricted to MFi-compliant Bluetooth hardware.
However, newer iOS devices (iPhone 4S, new iPad) are capable of Bluetooth 4.0 LE communication with external devices without the need for those devices to be MFi-compliant. This interaction is done through the new Core Bluetooth framework, which lets you send and receive arbitrary data to and from Bluetooth LE devices. This only works with those listed newer iOS devices, though.
Tim points out an interesting hack that you might be able to get away with in making your device appear like a Bluetooth HID keyboard. Devices like this barcode scanner have special modes to appear as HID devices to iOS. You might be able to pull something together based on this, but all data transfer will be one-way from your device, and it looks like this will require entering that data into text fields as if you had a keyboard connected.
Alasdair Alan's "iOS Sensor Apps with Arduino" is a good resource to look at. I've used Wifi with another microprocessor (mbed) but not sure about bluetooth. Alasdair is active on Twitter and he usually is kind enough to answer questions.
I want to place bluetooth devices in different locations and record when the phone gets into each's range. I realize iphone can only connect to mfi devices but can it find out a device id for non-mfi??
If there is a way, would this pass apples app review? I need this app to be able to get into the app store.
Yup, if you have Bluetooth enabled on the iPhone other devices can connect to it. In particular they could do SDP queries (or Remote Name Requests or even a RFCOMM connect).
Or if the phone is in Bluetooth discoverable mode the other devices could do device discovery (inquiry) to find it. (Does the phone stay in discoverable mode when locked?)
It's not entirely clear from your question whether you want an iPhone app to detect the devices, or the devices to detect the phone.
If you have the former in mind, your requirement is exactly what BtLE's (Bluetooth 4.0/Smart/LE) advertising capability is for. Apple's iBeacon technology is such an implementation, or you might roll your own. It'll allow you to do fine grained location in an iOS6+ app running on 4S, 5, and recent iPads. BtLE advertisement detecting apps will easily pass App store guidelines.
From the other direction, devices with BT 2.x - 4.x radios, or with wifi radios, or with various scanners and software radios, will be able to detect mobile phones, tablets, and other radio equipped devices. How much can be discovered is wildly variable.
I need to know the MAC address or bluetooth device name of other devices near an iPhone. is this possible with the regular API?
With iOS 5 on the iPhone 4S, it is possible to detect Bluetooth Low Energy devices (which hardly exist yet). It's not possible with regular APIs. You can use BTstack.org if you consider Jailbreaking your device.
I am thinking about buying an iPod touch to make some money on developing apps for the iPhone. I like the concept of the App Store and had a quick look at it with iTunes.
Looks like applications are categorized, to be iPhone OR iPod applications.
Some apps which are free for the iPod seem to cost for iPhone users.
What is the difference of both platforms, or why is the App Store separating them ?
Does it make sense to develop for the iPhone using an iPod touch (beside phone/location related apps) ?
On developer.apple.com I can sign up for selling my Applications on the AppStore for 99$.
Do I have to expect any further costs ?
Is it a problem to develop from outside the US (in my case Germany) ?
The iPod touch is missing:
GPS
Bluetooth (iPod Touch 4G has Bluetooth)
Cellular network
Camera (iPod Touch 4G has front and back cameras)
Microphone (thanks John Topley) (iPod Touch 4G has headset with microphone)
Vibration
The 1G is lacking a speaker
On the plus side it weighs a bit less and is a bit smaller.. Other than that they are pretty much identical (no sarcasm here; it still has the same processor, OS, control system, and display) Personally I would get an iPhone, as you will probably end up getting one later on anyway. I have an iPod touch (bought first) and an iPhone. I never use the iPod anymore.
The iPod touch is obviously cheaper than the iPhone, and there is no contract necessary. However, at least in the UK you can get a contract-free iPhone, and you should be able to do so soon on AT&T in the USA.
There are no extra costs besides the $99 for application development (which is a yearly fee)
We are developing from the UK. One issue to be aware of when you eventually sell your application is tax withholding - Apple will retain 30% of your revenues. There are some forms you need to fill out - I dealt with this in another thread. Here's what I wrote there:
You need to fill out a W-8BEN and give it to Apple to avoid a 30% tax withholding. This requires that you have a SSN (Social Security Number). If, and only if, you do not have an SSN, you may supply an ITIN (Individual Taxpayer Identification Number) or an EIN (Employer ID Number).
To get an ITIN, you need to fill out form W7 and submit that to the IRS.
I currently use an iPod Touch for testing in development, but my application doesn't (currently) use any of the iPhone-only features (such as GPS or the camera).
Other than the hardware differences, the OS is the same, and the iPhone comes with a monthly fee from the cellphone carrier.
In the AppStore, you can mark your application as iPhone Only or iPod & iPhone. If you application needs detailed GPS, photo taking capability, etc you'll make it as iPhone only.
There is no way to set separate pricing for an app based on whether the user has an iPod or iPhone, unless you release two separate versions of the application.
iPod touch pros:
Less weight
Smaller size
Same OS & processor as iPhone
Cheaper than iPhone
iPod touch Cons:
No GPS
No Bluetooth (iPod Touch 4G has Bluetooth)
No Cellular network
No Camera (iPod Touch 4G has front and back cameras)
No Microphone (iPod Touch 4G has headset with microphone)
No Vibration
So, I will suggest going for iPhone.
In my opinion, developing an app both for iPhone and Touch will increase the market.
I use an iPhone 3G, iPhone 2G and an (original) iPod Touch for development. I really like to be able to test on ALL available devices.
The biggest problem I've found with using the iPod touch (2G) is that it's faster
than the iPhone. That's serious if you're working on a game. I've found the
iPhone 3G to be around 10fps slower than my iPod, so before submitting the app I'll probably have to shell out for an iPhone anyway. I'm really not looking forward to the sadomasochistic relationship that is your average telco contract.
I would recommend skipping the iPod Touch and going straight to the iPhone if development is your goal. It has more capabilities (GPS, Bluetooth, Cellular network and Camera) which makes for a wider range of potential applications that may actually be used.