36 | );
37 | }
38 | });
39 |
40 | React.render(
41 | ,
42 | document.body
43 | );
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Plugins/README:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder.
21 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/log:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 |
21 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
22 |
23 | tail -f "$CORDOVA_PATH/console.log"
24 |
--------------------------------------------------------------------------------
/iteration8/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Employee Directory
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVShared.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | // This file was emptied out in 3.6.0 release (July 2014).
21 | // It will be deleted in a future release.
22 | #import
23 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/src/ios/CDVLogger.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface CDVLogger : CDVPlugin
23 |
24 | - (void)logLevel:(CDVInvokedUrlCommand*)command;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVTimer.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface CDVTimer : NSObject
23 |
24 | + (void)start:(NSString*)name;
25 | + (void)stop:(NSString*)name;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/react-cordova/www/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Employee Directory
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/NSArray+Comparisons.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface NSArray (Comparisons)
23 |
24 | - (id)objectAtIndex:(NSUInteger)index withDefault:(id)aDefault;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Plugins/org.apache.cordova.console/CDVLogger.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface CDVLogger : CDVPlugin
23 |
24 | - (void)logLevel:(CDVInvokedUrlCommand*)command;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/apple_xcode_version:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 |
22 | # outputs which version of XCODE is installed
23 | XCODEBUILD_VERSION=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
24 | echo $XCODEBUILD_VERSION
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | Plugin documentation: [doc/index.md](doc/index.md)
23 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/src/ubuntu/console.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 |
15 | #include "console.h"
16 |
17 | #include
18 |
19 | Console::Console(Cordova *cordova) : CPlugin(cordova) {
20 | }
21 |
22 | void Console::logLevel(int scId, int ecId, QString level, QString message) {
23 | Q_UNUSED(scId)
24 | Q_UNUSED(ecId)
25 |
26 | if (level != "LOG")
27 | std::cout << "[" << level.toStdString() << "] ";
28 | std::cout << message.toStdString() << std::endl;
29 | }
30 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.device/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.device
21 |
22 | Plugin documentation: [doc/index.md](doc/index.md)
23 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.statusbar/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.statusbar
21 |
22 | Plugin documentation: [doc/index.md](doc/index.md)
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/NSMutableArray+QueueAdditions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface NSMutableArray (QueueAdditions)
23 |
24 | - (id)pop;
25 | - (id)queueHead;
26 | - (id)dequeue;
27 | - (void)enqueue:(id)obj;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/version:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 |
22 | #
23 | # Returns the VERSION of CordovaLib used.
24 | # Note: it does not work if the --shared option was used to create the project.
25 | #
26 |
27 | VERSION="3.6.3"
28 |
29 | echo $VERSION
30 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/HelloCordova-Prefix.pch:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 | //
20 | // Prefix header for all source files of the 'HelloCordova' target in the 'HelloCordova' project
21 | //
22 |
23 | #ifdef __OBJC__
24 | #import
25 | #import
26 | #endif
27 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import
22 |
23 | @interface CDVDevice : CDVPlugin
24 | {}
25 |
26 | + (NSString*)cordovaVersion;
27 |
28 | - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/apple_ios_version:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 |
22 | # outputs the highest level of iOS sdk installed
23 | iOS_X_VERSIONS=$(xcodebuild -showsdks | sed -e '/./{H;$!d;}' -e 'x;/iOS SDKs/!d;' | grep -o '[0-9]*\.[0-9]* ');
24 | echo $iOS_X_VERSIONS | tr " " "\n" | sort -g | tail -1;
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/apple_osx_version:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 |
22 | # outputs the highest level of OS X sdk installed
23 | OS_X_VERSIONS=$(xcodebuild -showsdks | sed -e '/./{H;$!d;}' -e 'x;/OS X SDKs/!d;' | grep -o '[0-9]*\.[0-9]* ');
24 | echo $OS_X_VERSIONS | tr " " "\n" | sort -g | tail -1;
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVJSON.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | @interface NSArray (CDVJSONSerializing)
21 | - (NSString*)JSONString;
22 | @end
23 |
24 | @interface NSDictionary (CDVJSONSerializing)
25 | - (NSString*)JSONString;
26 | @end
27 |
28 | @interface NSString (CDVJSONSerializing)
29 | - (id)JSONObject;
30 | @end
31 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Plugins/org.apache.cordova.device/CDVDevice.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import
22 |
23 | @interface CDVDevice : CDVPlugin
24 | {}
25 |
26 | + (NSString*)cordovaVersion;
27 |
28 | - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVDebug.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #ifdef DEBUG
21 | #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
22 | #else
23 | #define DLog(...)
24 | #endif
25 | #define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
26 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/lib/list-devices:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 |
21 | system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2 " iPad"}'
22 | system_profiler SPUSBDataType | sed -n -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2 " iPhone"}'
23 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVScreenOrientationDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @protocol CDVScreenOrientationDelegate
23 |
24 | - (NSUInteger)supportedInterfaceOrientations;
25 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
26 | - (BOOL)shouldAutorotate;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVUserAgentUtil.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface CDVUserAgentUtil : NSObject
23 | + (NSString*)originalUserAgent;
24 | + (void)acquireLock:(void (^)(NSInteger lockToken))block;
25 | + (void)releaseLock:(NSInteger*)lockToken;
26 | + (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken;
27 | @end
28 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVURLProtocol.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVAvailability.h"
22 |
23 | @class CDVViewController;
24 |
25 | @interface CDVURLProtocol : NSURLProtocol {}
26 |
27 | + (void)registerViewController:(CDVViewController*)viewController;
28 | + (void)unregisterViewController:(CDVViewController*)viewController;
29 | @end
30 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/www/cordova_plugins.js:
--------------------------------------------------------------------------------
1 | cordova.define('cordova/plugin_list', function(require, exports, module) {
2 | module.exports = [
3 | {
4 | "file": "plugins/org.apache.cordova.statusbar/www/statusbar.js",
5 | "id": "org.apache.cordova.statusbar.statusbar",
6 | "clobbers": [
7 | "window.StatusBar"
8 | ]
9 | },
10 | {
11 | "file": "plugins/org.apache.cordova.console/www/console-via-logger.js",
12 | "id": "org.apache.cordova.console.console",
13 | "clobbers": [
14 | "console"
15 | ]
16 | },
17 | {
18 | "file": "plugins/org.apache.cordova.console/www/logger.js",
19 | "id": "org.apache.cordova.console.logger",
20 | "clobbers": [
21 | "cordova.logger"
22 | ]
23 | },
24 | {
25 | "file": "plugins/org.apache.cordova.device/www/device.js",
26 | "id": "org.apache.cordova.device.device",
27 | "clobbers": [
28 | "device"
29 | ]
30 | }
31 | ];
32 | module.exports.metadata =
33 | // TOP OF METADATA
34 | {
35 | "org.apache.cordova.statusbar": "0.1.8",
36 | "org.apache.cordova.console": "0.2.11",
37 | "org.apache.cordova.device": "0.2.12"
38 | }
39 | // BOTTOM OF METADATA
40 | });
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/main.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 | //
20 | // main.m
21 | // HelloCordova
22 | //
23 | // Created by ___FULLUSERNAME___ on ___DATE___.
24 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
25 | //
26 |
27 | #import
28 |
29 | int main(int argc, char* argv[])
30 | {
31 | @autoreleasepool {
32 | int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
33 | return retVal;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/UIDevice+Extensions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface UIDevice (org_apache_cordova_UIDevice_Extension)
23 |
24 | /*
25 | Get the unique identifier from the app bundle's folder, which is already a GUID
26 | Upgrading and/or deleting the app and re-installing will get you a new GUID, so
27 | this is only unique per install per device.
28 | */
29 | - (NSString*)uniqueAppInstanceIdentifier;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/src/ubuntu/console.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 |
15 | #ifndef CONSOLE_H_FDSVCXGFRS
16 | #define CONSOLE_H_FDSVCXGFRS
17 |
18 | #include
19 |
20 | #include
21 |
22 | class Console : public CPlugin {
23 | Q_OBJECT
24 | public:
25 | explicit Console(Cordova *cordova);
26 |
27 | virtual const QString fullName() override {
28 | return Console::fullID();
29 | }
30 |
31 | virtual const QString shortName() override {
32 | return "Console";
33 | }
34 |
35 | static const QString fullID() {
36 | return "Console";
37 | }
38 |
39 | public slots:
40 | void logLevel(int scId, int ecId, QString level, QString message);
41 | };
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/console.log:
--------------------------------------------------------------------------------
1 | 2014-12-01 17:08:35.025 HelloCordova[34340:22882450] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/ccoenraets/Library/Developer/CoreSimulator/Devices/2F7AE512-51AB-4A89-B9FC-430CC65996AF/data/Containers/Data/Application/0A5FCE8B-47B9-4B5D-84D6-B600F268D68E/Library/Cookies/Cookies.binarycookies
2 | 2014-12-01 17:08:35.152 HelloCordova[34340:22882450] Apache Cordova native platform version 3.6.3 is starting.
3 | 2014-12-01 17:08:35.153 HelloCordova[34340:22882450] Multi-tasking -> Device: YES, App: YES
4 | 2014-12-01 17:08:35.162 HelloCordova[34340:22882450] Unlimited access to network resources
5 | 2014-12-01 17:08:35.170 HelloCordova[34340:22882450]
6 |
7 | Started backup to iCloud! Please be careful.
8 | Your application might be rejected by Apple if you store too much data.
9 | For more information please read "iOS Data Storage Guidelines" at:
10 | https://developer.apple.com/icloud/documentation/data-storage/
11 |
12 | 2014-12-01 17:08:36.903 HelloCordova[34340:22882450] Resetting plugins due to page load.
13 | 2014-12-01 17:08:37.469 HelloCordova[34340:22882450] Finished load of: file:///Users/ccoenraets/Library/Developer/CoreSimulator/Devices/2F7AE512-51AB-4A89-B9FC-430CC65996AF/data/Containers/Bundle/Application/020A0265-E4AD-4F45-94C6-DC4ACB21B592/HelloCordova.app/www/index.html
14 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Resources/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | // controller title for Videos
21 | "Videos title" = "Videos";
22 | // accessibility label for recording button
23 | "toggle audio recording" = "toggle audio recording";
24 | // notification spoken by VoiceOver when timed recording finishes
25 | "timed recording complete" = "timed recording complete";
26 | // accessibility hint for display of recorded elapsed time
27 | "recorded time in minutes and seconds" = "recorded time in minutes and seconds";
28 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Resources/se.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 |
21 | // controller title for Videos
22 | "Videos title" = "Videor";
23 | // accessibility label for recording button
24 | "toggle audio recording" = "börja/avsluta inspelning";
25 | // notification spoken by VoiceOver when timed recording finishes
26 | "timed recording complete" = "inspelning har avslutad";
27 | // accessibility hint for display of recorded elapsed time
28 | "recorded time in minutes and seconds" = "inspelad tid in minuter och sekund";
29 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Resources/es.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | // controller title for Videos
21 | "Videos title" = "Videos";
22 | // accessibility label for recording button
23 | "toggle audio recording" = "grabación de audio cambiar";
24 | // notification spoken by VoiceOver when timed recording finishes
25 | "timed recording complete" = "tiempo de grabación completo";
26 | // accessibility hint for display of recorded elapsed time
27 | "recorded time in minutes and seconds" = "tiempo registrado en minutos y segundos";
28 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/lib/sim.applescript:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | tell application "System Events"
19 | set UI elements enabled to true
20 | end tell
21 |
22 | tell application "iPhone Simulator"
23 | activate
24 | end tell
25 |
26 | tell application "System Events"
27 | tell process "iPhone Simulator"
28 | click menu item "$DEVICE_NAME" of menu 1 of menu item "Device" of menu 1 of menu bar item "Hardware" of menu bar 1
29 | click menu item "Home" of menu 1 of menu bar item "Hardware" of menu bar 1
30 | end tell
31 | end tell
32 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/src/ios/CDVLogger.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVLogger.h"
21 | #import
22 |
23 | @implementation CDVLogger
24 |
25 | /* log a message */
26 | - (void)logLevel:(CDVInvokedUrlCommand*)command
27 | {
28 | id level = [command.arguments objectAtIndex:0];
29 | id message = [command.arguments objectAtIndex:1];
30 |
31 | if ([level isEqualToString:@"LOG"]) {
32 | NSLog(@"%@", message);
33 | } else {
34 | NSLog(@"%@: %@", level, message);
35 | }
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/doc/zh/index.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | 這個外掛程式是為了確保該 console.log() 是一樣有用,它可以是。 它將添加附加功能的 iOS、 Ubuntu,Windows Phone 8 和 Windows 8。 如果你是快樂與 console.log() 是如何為你工作,那麼可能不需要這個外掛程式。
23 |
24 | ## 安裝
25 |
26 | cordova plugin add org.apache.cordova.console
27 |
28 |
29 | ### Android 的怪癖
30 |
31 | 在一些非 Android 平臺上,console.log() 將作用於多個參數,如 console.log ("1"、"2"、"3")。 然而,Android 將僅在第一個參數上採取行動。 對 console.log() 的後續參數將被忽略。 這個外掛程式不是的原因,,它是安卓系統本身的限制。
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVWhitelist.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | extern NSString* const kCDVDefaultWhitelistRejectionString;
23 |
24 | @interface CDVWhitelist : NSObject
25 |
26 | @property (nonatomic, copy) NSString* whitelistRejectionFormatString;
27 |
28 | - (id)initWithArray:(NSArray*)array;
29 | - (BOOL)schemeIsAllowed:(NSString*)scheme;
30 | - (BOOL)URLIsAllowed:(NSURL*)url;
31 | - (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure;
32 | - (NSString*)errorStringForURL:(NSURL*)url;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Resources/de.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 |
21 | // controller title for Videos
22 | "Videos title" = "Videos";
23 | // accessibility label for recording button
24 | "toggle audio recording" = "starten/beenden der Tonaufnahme";
25 | // notification spoken by VoiceOver when timed recording finishes
26 | "timed recording complete" = "programmierte Aufnahme beendet";
27 | // accessibility hint for display of recorded elapsed time
28 | "recorded time in minutes and seconds" = "aufgenommene Zeit in Minuten und Sekunden";
29 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/lib/start-emulator:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 | # Valid values for "--target" (case insensitive):
21 | # "iPhone (Retina 3.5-inch)" (default)
22 | # "iPhone (Retina 4-inch)"
23 | # "iPhone"
24 | # "iPad"
25 | # "iPad (Retina)"
26 |
27 | set -e
28 |
29 |
30 | DEFAULT_TARGET="iPhone Retina (3.5-inch)"
31 | TARGET=${1:-$DEFAULT_TARGET}
32 | LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P)
33 |
34 | SCPT=`sed -e "s/\\$DEVICE_NAME/$TARGET/g" "$LIB_PATH/sim.applescript"`
35 | osascript -e "$SCPT"
36 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.device/src/ubuntu/device.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Wolfgang Koller - http://www.gofg.at/
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef DEVICE_H_FDSAFAS
18 | #define DEVICE_H_FDSAFAS
19 |
20 | #include
21 |
22 | #include
23 |
24 | class Device: public CPlugin {
25 | Q_OBJECT
26 | public:
27 | explicit Device(Cordova *cordova);
28 |
29 | virtual const QString fullName() override {
30 | return Device::fullID();
31 | }
32 |
33 | virtual const QString shortName() override {
34 | return "Device";
35 | }
36 |
37 | static const QString fullID() {
38 | return "com.cordova.Device";
39 | }
40 |
41 | signals:
42 |
43 | public slots:
44 | void getInfo(int scId, int ecId);
45 | };
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.device/tests/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
26 | Cordova Device Plugin Tests
27 | Apache 2.0
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVConfigParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | @interface CDVConfigParser : NSObject
21 | {
22 | NSString* featureName;
23 | }
24 |
25 | @property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict;
26 | @property (nonatomic, readonly, strong) NSMutableDictionary* settings;
27 | @property (nonatomic, readonly, strong) NSMutableArray* whitelistHosts;
28 | @property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames;
29 | @property (nonatomic, readonly, strong) NSString* startPage;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Plugins/org.apache.cordova.console/CDVLogger.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVLogger.h"
21 | #import
22 |
23 | @implementation CDVLogger
24 |
25 | /* log a message */
26 | - (void)logLevel:(CDVInvokedUrlCommand*)command
27 | {
28 | id level = [command.arguments objectAtIndex:0];
29 | id message = [command.arguments objectAtIndex:1];
30 |
31 | if ([level isEqualToString:@"LOG"]) {
32 | NSLog(@"%@", message);
33 | } else {
34 | NSLog(@"%@: %@", level, message);
35 | }
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.statusbar/tests/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
26 | Cordova StatusBar Plugin Tests
27 | Apache 2.0
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/iteration5/js/router.js:
--------------------------------------------------------------------------------
1 | var router = (function () {
2 |
3 | "use strict";
4 |
5 | var routes = [];
6 |
7 | function addRoute(route, handler) {
8 |
9 | routes.push({parts: route.split('/'), handler: handler});
10 | }
11 |
12 | function load(route) {
13 | window.location.hash = route;
14 | }
15 |
16 | function start() {
17 |
18 | var path = window.location.hash.substr(1),
19 | parts = path.split('/'),
20 | partsLength = parts.length;
21 |
22 | for (var i = 0; i < routes.length; i++) {
23 | var route = routes[i];
24 | if (route.parts.length === partsLength) {
25 | var params = [];
26 | for (var j = 0; j < partsLength; j++) {
27 | if (route.parts[j].substr(0, 1) === ':') {
28 | params.push(parts[j]);
29 | } else if (route.parts[j] !== parts[j]) {
30 | break;
31 | }
32 | }
33 | if (j === partsLength) {
34 | route.handler.apply(undefined, params);
35 | return;
36 | }
37 | }
38 | }
39 | }
40 |
41 | window.onhashchange = start;
42 |
43 | return {
44 | addRoute: addRoute,
45 | load: load,
46 | start: start
47 | };
48 |
49 | }());
--------------------------------------------------------------------------------
/iteration6/js/router.js:
--------------------------------------------------------------------------------
1 | var router = (function () {
2 |
3 | "use strict";
4 |
5 | var routes = [];
6 |
7 | function addRoute(route, handler) {
8 |
9 | routes.push({parts: route.split('/'), handler: handler});
10 | }
11 |
12 | function load(route) {
13 | window.location.hash = route;
14 | }
15 |
16 | function start() {
17 |
18 | var path = window.location.hash.substr(1),
19 | parts = path.split('/'),
20 | partsLength = parts.length;
21 |
22 | for (var i = 0; i < routes.length; i++) {
23 | var route = routes[i];
24 | if (route.parts.length === partsLength) {
25 | var params = [];
26 | for (var j = 0; j < partsLength; j++) {
27 | if (route.parts[j].substr(0, 1) === ':') {
28 | params.push(parts[j]);
29 | } else if (route.parts[j] !== parts[j]) {
30 | break;
31 | }
32 | }
33 | if (j === partsLength) {
34 | route.handler.apply(undefined, params);
35 | return;
36 | }
37 | }
38 | }
39 | }
40 |
41 | window.onhashchange = start;
42 |
43 | return {
44 | addRoute: addRoute,
45 | load: load,
46 | start: start
47 | };
48 |
49 | }());
--------------------------------------------------------------------------------
/iteration7/js/router.js:
--------------------------------------------------------------------------------
1 | var router = (function () {
2 |
3 | "use strict";
4 |
5 | var routes = [];
6 |
7 | function addRoute(route, handler) {
8 |
9 | routes.push({parts: route.split('/'), handler: handler});
10 | }
11 |
12 | function load(route) {
13 | window.location.hash = route;
14 | }
15 |
16 | function start() {
17 |
18 | var path = window.location.hash.substr(1),
19 | parts = path.split('/'),
20 | partsLength = parts.length;
21 |
22 | for (var i = 0; i < routes.length; i++) {
23 | var route = routes[i];
24 | if (route.parts.length === partsLength) {
25 | var params = [];
26 | for (var j = 0; j < partsLength; j++) {
27 | if (route.parts[j].substr(0, 1) === ':') {
28 | params.push(parts[j]);
29 | } else if (route.parts[j] !== parts[j]) {
30 | break;
31 | }
32 | }
33 | if (j === partsLength) {
34 | route.handler.apply(undefined, params);
35 | return;
36 | }
37 | }
38 | }
39 | }
40 |
41 | window.onhashchange = start;
42 |
43 | return {
44 | addRoute: addRoute,
45 | load: load,
46 | start: start
47 | };
48 |
49 | }());
--------------------------------------------------------------------------------
/iteration8/js/router.js:
--------------------------------------------------------------------------------
1 | var router = (function () {
2 |
3 | "use strict";
4 |
5 | var routes = [];
6 |
7 | function addRoute(route, handler) {
8 |
9 | routes.push({parts: route.split('/'), handler: handler});
10 | }
11 |
12 | function load(route) {
13 | window.location.hash = route;
14 | }
15 |
16 | function start() {
17 |
18 | var path = window.location.hash.substr(1),
19 | parts = path.split('/'),
20 | partsLength = parts.length;
21 |
22 | for (var i = 0; i < routes.length; i++) {
23 | var route = routes[i];
24 | if (route.parts.length === partsLength) {
25 | var params = [];
26 | for (var j = 0; j < partsLength; j++) {
27 | if (route.parts[j].substr(0, 1) === ':') {
28 | params.push(parts[j]);
29 | } else if (route.parts[j] !== parts[j]) {
30 | break;
31 | }
32 | }
33 | if (j === partsLength) {
34 | route.handler.apply(undefined, params);
35 | return;
36 | }
37 | }
38 | }
39 | }
40 |
41 | window.onhashchange = start;
42 |
43 | return {
44 | addRoute: addRoute,
45 | load: load,
46 | start: start
47 | };
48 |
49 | }());
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/check_reqs:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 |
22 | XCODEBUILD_LOCATION=$(which xcodebuild)
23 | if [ $? != 0 ]; then
24 | echo "Xcode is (probably) not installed, specifically the command 'xcodebuild' is unavailable."
25 | exit 2
26 | fi
27 |
28 | XCODEBUILD_MIN_VERSION="4.6"
29 | XCODEBUILD_VERSION=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
30 |
31 | if [[ "$XCODEBUILD_VERSION" < "$XCODEBUILD_MIN_VERSION" ]]; then
32 | echo "Cordova can only run in Xcode version $XCODEBUILD_MIN_VERSION or greater."
33 | exit 2
34 | fi
35 |
--------------------------------------------------------------------------------
/react-cordova/www/js/router.js:
--------------------------------------------------------------------------------
1 | var router = (function () {
2 |
3 | "use strict";
4 |
5 | var routes = [];
6 |
7 | function addRoute(route, handler) {
8 |
9 | routes.push({parts: route.split('/'), handler: handler});
10 | }
11 |
12 | function load(route) {
13 | window.location.hash = route;
14 | }
15 |
16 | function start() {
17 |
18 | var path = window.location.hash.substr(1),
19 | parts = path.split('/'),
20 | partsLength = parts.length;
21 |
22 | for (var i = 0; i < routes.length; i++) {
23 | var route = routes[i];
24 | if (route.parts.length === partsLength) {
25 | var params = [];
26 | for (var j = 0; j < partsLength; j++) {
27 | if (route.parts[j].substr(0, 1) === ':') {
28 | params.push(parts[j]);
29 | } else if (route.parts[j] !== parts[j]) {
30 | break;
31 | }
32 | }
33 | if (j === partsLength) {
34 | route.handler.apply(undefined, params);
35 | return;
36 | }
37 | }
38 | }
39 | }
40 |
41 | window.onhashchange = start;
42 |
43 | return {
44 | addRoute: addRoute,
45 | load: load,
46 | start: start
47 | };
48 |
49 | }());
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/lib/list-started-emulators:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 | # Valid values for "--target" (case insensitive):
21 | # "iPhone (Retina 3.5-inch)" (default)
22 | # "iPhone (Retina 4-inch)"
23 | # "iPhone"
24 | # "iPad"
25 | # "iPad (Retina)"
26 |
27 | set -e
28 |
29 | SIM_RUNNING=$(ps aux | grep -i "[i]Phone Simulator" | wc -l)
30 | if [ $SIM_RUNNING == 0 ]; then
31 | echo "No emulators are running."
32 | exit 1
33 | fi
34 |
35 | SIM_ID=`defaults read com.apple.iphonesimulator "SimulateDevice"`
36 | echo \"$SIM_ID\"
37 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/www/js/router.js:
--------------------------------------------------------------------------------
1 | var router = (function () {
2 |
3 | "use strict";
4 |
5 | var routes = [];
6 |
7 | function addRoute(route, handler) {
8 |
9 | routes.push({parts: route.split('/'), handler: handler});
10 | }
11 |
12 | function load(route) {
13 | window.location.hash = route;
14 | }
15 |
16 | function start() {
17 |
18 | var path = window.location.hash.substr(1),
19 | parts = path.split('/'),
20 | partsLength = parts.length;
21 |
22 | for (var i = 0; i < routes.length; i++) {
23 | var route = routes[i];
24 | if (route.parts.length === partsLength) {
25 | var params = [];
26 | for (var j = 0; j < partsLength; j++) {
27 | if (route.parts[j].substr(0, 1) === ':') {
28 | params.push(parts[j]);
29 | } else if (route.parts[j] !== parts[j]) {
30 | break;
31 | }
32 | }
33 | if (j === partsLength) {
34 | route.handler.apply(undefined, params);
35 | return;
36 | }
37 | }
38 | }
39 | }
40 |
41 | window.onhashchange = start;
42 |
43 | return {
44 | addRoute: addRoute,
45 | load: load,
46 | start: start
47 | };
48 |
49 | }());
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/lib/list-emulator-images:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 | # Valid values for "--target" (case insensitive):
21 | # "iPhone Retina (3.5-inch)" (default)
22 | # "iPhone Retina (4-inch)"
23 | # "iPhone"
24 | # "iPad"
25 | # "iPad Retina"
26 |
27 | set -e
28 |
29 | echo \""iPhone (Retina 3.5-inch)"\"
30 | echo \""iPhone (Retina 4-inch)"\"
31 |
32 | # this assumes Xcode 5 minimum not supported by ios-sim yet
33 | # echo \""iPhone (Retina 4-inch 64-bit)"\"
34 |
35 | echo \""iPhone"\"
36 | echo \""iPad"\"
37 | echo \""iPad (Retina)"\"
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/doc/ja/index.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | このプラグインは、その console.log() がすることができます便利なことを確認するものです。 それは、iOS、Ubuntu、Windows Phone 8 および Windows 8 の追加関数を追加します。 場合はあなたのための console.log() の作品に満足しているし、おそらく必要はありませんこのプラグイン。
23 |
24 | ## インストール
25 |
26 | cordova plugin add org.apache.cordova.console
27 |
28 |
29 | ### Android の癖
30 |
31 | アンドロイド以外のいくつかのプラットフォームで console.log() は console.log (「1」、「2」、「3」) など、複数の引数に動作します。 しかし、アンドロイドは、最初の引数でのみ動作します。 Console.log() に後続の引数は無視されます。 このプラグインが原因ではない、それは Android の自体の制限です。
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVCommandDelegate.h"
22 |
23 | @class CDVViewController;
24 | @class CDVCommandQueue;
25 |
26 | @interface CDVCommandDelegateImpl : NSObject {
27 | @private
28 | __weak CDVViewController* _viewController;
29 | NSRegularExpression* _callbackIdPattern;
30 | @protected
31 | __weak CDVCommandQueue* _commandQueue;
32 | BOOL _delayResponses;
33 | }
34 | - (id)initWithViewController:(CDVViewController*)viewController;
35 | - (void)flushCommandQueueWithDelayedJs;
36 | @end
37 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Classes/MainViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | //
21 | // MainViewController.h
22 | // HelloCordova
23 | //
24 | // Created by ___FULLUSERNAME___ on ___DATE___.
25 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
26 | //
27 |
28 | #import
29 | #import
30 | #import
31 |
32 | @interface MainViewController : CDVViewController
33 |
34 | @end
35 |
36 | @interface MainCommandDelegate : CDVCommandDelegateImpl
37 | @end
38 |
39 | @interface MainCommandQueue : CDVCommandQueue
40 | @end
41 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/doc/ko/index.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | 이 플러그인을 console.log()로 수 유용 되도록 의미입니다. IOS, 우분투, Windows Phone 8 및 윈도우 8에 대 한 추가 기능을 추가 하 고 합니다. Console.log() 당신을 위해 작동 하는 어떻게 행복 한 경우에, 그때 당신은 아마 필요 하지 않습니다이 플러그인.
23 |
24 | ## 설치
25 |
26 | cordova plugin add org.apache.cordova.console
27 |
28 |
29 | ### 안 드 로이드 단점
30 |
31 | 안 드 로이드 이외의 일부 플랫폼에서 console.log() console.log ("1", "2", "3")와 같이 여러 인수에 작동할 것 이다. 그러나, 안 드 로이드는 첫 번째 인수에만 작동할 것 이다. Console.log() 후속 인수는 무시 됩니다. 이 플러그인의 원인이 되지 않습니다, 그리고 그것은 안 드 로이드 자체의 한계입니다.
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.device/src/ubuntu/device.js:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | *
20 | */
21 |
22 | var cordova = require('cordova');
23 | var exec = require('cordova/exec');
24 |
25 | module.exports = {
26 | getInfo:function(win,fail,args) {
27 | Cordova.exec(function (model, cordova, platform, uuid, version) {
28 | win({name: name, model: model, cordova: cordova,
29 | platform: platform, uuid: uuid, version: version});
30 | }, null, "com.cordova.Device", "getInfo", []);
31 | }
32 | };
33 |
34 | require("cordova/exec/proxy").add("Device", module.exports);
35 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/NSArray+Comparisons.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "NSArray+Comparisons.h"
21 |
22 | @implementation NSArray (Comparisons)
23 |
24 | - (id)objectAtIndex:(NSUInteger)index withDefault:(id)aDefault
25 | {
26 | id obj = nil;
27 |
28 | @try {
29 | obj = [self objectAtIndex:index];
30 | if ((obj == [NSNull null]) || (obj == nil)) {
31 | return aDefault;
32 | }
33 | }
34 | @catch(NSException* exception) {
35 | NSLog(@"Exception - Name: %@ Reason: %@", [exception name], [exception reason]);
36 | }
37 |
38 | return obj;
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/clean:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 |
22 | #
23 | # Clean a Cordova/iOS project
24 | #
25 |
26 | set -e
27 |
28 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
29 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
30 | XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj )
31 | PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
32 |
33 | source "$CORDOVA_PATH/check_reqs"
34 |
35 | cd "$PROJECT_PATH"
36 |
37 | xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Debug -alltargets clean
38 | xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Release -alltargets clean
39 |
40 | rm -rf "build"
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVCommandQueue.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @class CDVInvokedUrlCommand;
23 | @class CDVViewController;
24 |
25 | @interface CDVCommandQueue : NSObject
26 |
27 | @property (nonatomic, readonly) BOOL currentlyExecuting;
28 |
29 | - (id)initWithViewController:(CDVViewController*)viewController;
30 | - (void)dispose;
31 |
32 | - (void)resetRequestId;
33 | - (void)enqueueCommandBatch:(NSString*)batchJSON;
34 |
35 | - (void)processXhrExecBridgePoke:(NSNumber*)requestId;
36 | - (void)fetchCommandsFromJs;
37 | - (void)executePending;
38 | - (BOOL)execute:(CDVInvokedUrlCommand*)command;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.device/src/tizen/DeviceProxy.js:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | *
20 | */
21 |
22 | var tizen = require('cordova/platform');
23 | var cordova = require('cordova');
24 |
25 | module.exports = {
26 | getDeviceInfo: function(success, error) {
27 | setTimeout(function () {
28 | success({
29 | cordova: tizen.cordovaVersion,
30 | platform: 'tizen',
31 | model: null,
32 | version: null,
33 | uuid: null
34 | });
35 | }, 0);
36 | }
37 | };
38 |
39 | require("cordova/tizen/commandProxy").add("Device", module.exports);
40 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDV.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVAvailability.h"
21 |
22 | #import "CDVPlugin.h"
23 | #import "CDVViewController.h"
24 | #import "CDVCommandDelegate.h"
25 | #import "CDVURLProtocol.h"
26 | #import "CDVInvokedUrlCommand.h"
27 |
28 | #import "CDVDebug.h"
29 | #import "CDVPluginResult.h"
30 | #import "CDVWhitelist.h"
31 | #import "CDVLocalStorage.h"
32 | #import "CDVScreenOrientationDelegate.h"
33 | #import "CDVTimer.h"
34 |
35 | #import "NSArray+Comparisons.h"
36 | #import "NSData+Base64.h"
37 | #import "NSDictionary+Extensions.h"
38 | #import "NSMutableArray+QueueAdditions.h"
39 | #import "UIDevice+Extensions.h"
40 |
41 | #import "CDVJSON.h"
42 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
21 |
22 | # Contributing to Apache Cordova
23 |
24 | Anyone can contribute to Cordova. And we need your contributions.
25 |
26 | There are multiple ways to contribute: report bugs, improve the docs, and
27 | contribute code.
28 |
29 | For instructions on this, start with the
30 | [contribution overview](http://cordova.apache.org/#contribute).
31 |
32 | The details are explained there, but the important items are:
33 | - Sign and submit an Apache ICLA (Contributor License Agreement).
34 | - Have a Jira issue open that corresponds to your contribution.
35 | - Run the tests so your patch doesn't break existing functionality.
36 |
37 | We look forward to your contributions!
38 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.device/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
21 |
22 | # Contributing to Apache Cordova
23 |
24 | Anyone can contribute to Cordova. And we need your contributions.
25 |
26 | There are multiple ways to contribute: report bugs, improve the docs, and
27 | contribute code.
28 |
29 | For instructions on this, start with the
30 | [contribution overview](http://cordova.apache.org/#contribute).
31 |
32 | The details are explained there, but the important items are:
33 | - Sign and submit an Apache ICLA (Contributor License Agreement).
34 | - Have a Jira issue open that corresponds to your contribution.
35 | - Run the tests so your patch doesn't break existing functionality.
36 |
37 | We look forward to your contributions!
38 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.statusbar/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
21 |
22 | # Contributing to Apache Cordova
23 |
24 | Anyone can contribute to Cordova. And we need your contributions.
25 |
26 | There are multiple ways to contribute: report bugs, improve the docs, and
27 | contribute code.
28 |
29 | For instructions on this, start with the
30 | [contribution overview](http://cordova.apache.org/#contribute).
31 |
32 | The details are explained there, but the important items are:
33 | - Sign and submit an Apache ICLA (Contributor License Agreement).
34 | - Have a Jira issue open that corresponds to your contribution.
35 | - Run the tests so your patch doesn't break existing functionality.
36 |
37 | We look forward to your contributions!
38 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/src/wp/DebugConsole.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed under the Apache License, Version 2.0 (the "License");
3 | you may not use this file except in compliance with the License.
4 | You may obtain a copy of the License at
5 |
6 | http://www.apache.org/licenses/LICENSE-2.0
7 |
8 | Unless required by applicable law or agreed to in writing, software
9 | distributed under the License is distributed on an "AS IS" BASIS,
10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | See the License for the specific language governing permissions and
12 | limitations under the License.
13 | */
14 |
15 | using System;
16 | using System.Net;
17 | using System.Windows;
18 | using System.Windows.Controls;
19 | using System.Windows.Documents;
20 | using System.Windows.Ink;
21 | using System.Windows.Input;
22 | using System.Windows.Media;
23 | using System.Windows.Media.Animation;
24 | using System.Windows.Shapes;
25 | using System.Diagnostics;
26 |
27 | namespace WPCordovaClassLib.Cordova.Commands
28 | {
29 | public class DebugConsole : BaseCommand
30 | {
31 | public void logLevel(string options)
32 | {
33 | string[] args = JSON.JsonHelper.Deserialize(options);
34 | string level = args[0];
35 | string msg = args[1];
36 |
37 | if (level.Equals("LOG"))
38 | {
39 | Debug.WriteLine(msg);
40 | }
41 | else
42 | {
43 | Debug.WriteLine(level + ": " + msg);
44 | }
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/NSData+Base64.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSData+Base64.h
3 | // base64
4 | //
5 | // Created by Matt Gallagher on 2009/06/03.
6 | // Copyright 2009 Matt Gallagher. All rights reserved.
7 | //
8 | // This software is provided 'as-is', without any express or implied
9 | // warranty. In no event will the authors be held liable for any damages
10 | // arising from the use of this software. Permission is granted to anyone to
11 | // use this software for any purpose, including commercial applications, and to
12 | // alter it and redistribute it freely, subject to the following restrictions:
13 | //
14 | // 1. The origin of this software must not be misrepresented; you must not
15 | // claim that you wrote the original software. If you use this software
16 | // in a product, an acknowledgment in the product documentation would be
17 | // appreciated but is not required.
18 | // 2. Altered source versions must be plainly marked as such, and must not be
19 | // misrepresented as being the original software.
20 | // 3. This notice may not be removed or altered from any source
21 | // distribution.
22 | //
23 |
24 | #import
25 |
26 | void *CDVNewBase64Decode(
27 | const char* inputBuffer,
28 | size_t length,
29 | size_t * outputLength);
30 |
31 | char *CDVNewBase64Encode(
32 | const void* inputBuffer,
33 | size_t length,
34 | bool separateLines,
35 | size_t * outputLength);
36 |
37 | @interface NSData (CDVBase64)
38 |
39 | + (NSData*)dataFromBase64String:(NSString*)aString;
40 | - (NSString*)base64EncodedString;
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/doc/es/index.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | Este plugin es para asegurarse de que console.log() es tan útil como puede ser. Añade función adicional para iOS, Windows Phone 8, Ubuntu y Windows 8. Si estás contento con cómo funciona console.log() para ti, entonces probablemente no necesitas este plugin.
23 |
24 | ## Instalación
25 |
26 | cordova plugin add org.apache.cordova.console
27 |
28 |
29 | ### Rarezas Android
30 |
31 | En algunas plataformas que no sean Android, console.log() actuará en varios argumentos, como console.log ("1", "2", "3"). Sin embargo, Android actuará sólo en el primer argumento. Se omitirá posteriores argumentos para console.log(). Este plugin no es la causa de eso, es una limitación propia de Android.
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Classes/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | //
21 | // AppDelegate.h
22 | // HelloCordova
23 | //
24 | // Created by ___FULLUSERNAME___ on ___DATE___.
25 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
26 | //
27 |
28 | #import
29 |
30 | #import
31 |
32 | @interface AppDelegate : NSObject {}
33 |
34 | // invoke string is passed to your app on launch, this is only valid if you
35 | // edit HelloCordova-Info.plist to add a protocol
36 | // a simple tutorial can be found here :
37 | // http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
38 |
39 | @property (nonatomic, strong) IBOutlet UIWindow* window;
40 | @property (nonatomic, strong) IBOutlet CDVViewController* viewController;
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/doc/index.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | This plugin is meant to ensure that console.log() is as useful as it can be.
23 | It adds additional function for iOS, Ubuntu, Windows Phone 8, and Windows 8. If
24 | you are happy with how console.log() works for you, then you probably
25 | don't need this plugin.
26 |
27 | ## Installation
28 |
29 | cordova plugin add org.apache.cordova.console
30 |
31 | ### Android Quirks
32 |
33 | On some platforms other than Android, console.log() will act on multiple
34 | arguments, such as console.log("1", "2", "3"). However, Android will act only
35 | on the first argument. Subsequent arguments to console.log() will be ignored.
36 | This plugin is not the cause of that, it is a limitation of Android itself.
37 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/doc/it/index.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | Questo plugin è intesa a garantire che console.log() è tanto utile quanto può essere. Aggiunge una funzione aggiuntiva per iOS, Ubuntu, Windows 8 e Windows Phone 8. Se sei soddisfatto di come console.log() funziona per voi, quindi probabilmente non è necessario questo plugin.
23 |
24 | ## Installazione
25 |
26 | cordova plugin add org.apache.cordova.console
27 |
28 |
29 | ### Stranezze Android
30 |
31 | Su alcune piattaforme diverse da Android, console.log() agirà su più argomenti, come ad esempio console ("1", "2", "3"). Tuttavia, Android agirà solo sul primo argomento. Argomenti successivi a console.log() verranno ignorati. Questo plugin non è la causa di ciò, è una limitazione di Android stesso.
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/NSDictionary+Extensions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface NSDictionary (org_apache_cordova_NSDictionary_Extension)
23 |
24 | - (bool)existsValue:(NSString*)expectedValue forKey:(NSString*)key;
25 | - (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue withRange:(NSRange)range;
26 | - (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue;
27 | - (BOOL)typeValueForKey:(NSString*)key isArray:(BOOL*)bArray isNull:(BOOL*)bNull isNumber:(BOOL*)bNumber isString:(BOOL*)bString;
28 | - (BOOL)valueForKeyIsArray:(NSString*)key;
29 | - (BOOL)valueForKeyIsNull:(NSString*)key;
30 | - (BOOL)valueForKeyIsString:(NSString*)key;
31 | - (BOOL)valueForKeyIsNumber:(NSString*)key;
32 |
33 | - (NSDictionary*)dictionaryWithLowercaseKeys;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/doc/pl/index.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | Ten plugin jest przeznaczona do zapewnienia, że console.log() jest tak przydatne, jak to może być. To dodaje dodatkową funkcję dla iOS, Ubuntu, Windows Phone 8 i Windows 8. Jeśli jesteś zadowolony z jak console.log() pracuje dla Ciebie, wtedy prawdopodobnie nie potrzebują tej wtyczki.
23 |
24 | ## Instalacji
25 |
26 | cordova plugin add org.apache.cordova.console
27 |
28 |
29 | ### Android dziwactwa
30 |
31 | Na niektórych platformach innych niż Android console.log() będzie działać na wielu argumentów, takich jak console.log ("1", "2", "3"). Jednak Android będzie działać tylko na pierwszy argument. Kolejne argumenty do console.log() będą ignorowane. Ten plugin nie jest przyczyną, że, jest to ograniczenie Androida, sam.
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/doc/ru/index.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | Этот плагин предназначен для обеспечения как полезным, поскольку это может быть что console.log(). Он добавляет дополнительные функции для iOS, Ubuntu, Windows Phone 8 и Windows 8. Если вы не довольны как console.log() работает для вас, то вы вероятно не нужен этот плагин.
23 |
24 | ## Установка
25 |
26 | cordova plugin add org.apache.cordova.console
27 |
28 |
29 | ### Android причуды
30 |
31 | На некоторых платформах, отличных от Android console.log() будет действовать на нескольких аргументов, например console.log («1», «2», «3»). Тем не менее Android будет действовать только на первого аргумента. Последующие аргументы для console.log() будет игнорироваться. Этот плагин не является причиной этого, это ограничение Android сам.
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/NSMutableArray+QueueAdditions.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "NSMutableArray+QueueAdditions.h"
21 |
22 | @implementation NSMutableArray (QueueAdditions)
23 |
24 | - (id)queueHead
25 | {
26 | if ([self count] == 0) {
27 | return nil;
28 | }
29 |
30 | return [self objectAtIndex:0];
31 | }
32 |
33 | - (__autoreleasing id)dequeue
34 | {
35 | if ([self count] == 0) {
36 | return nil;
37 | }
38 |
39 | id head = [self objectAtIndex:0];
40 | if (head != nil) {
41 | // [[head retain] autorelease]; ARC - the __autoreleasing on the return value should so the same thing
42 | [self removeObjectAtIndex:0];
43 | }
44 |
45 | return head;
46 | }
47 |
48 | - (id)pop
49 | {
50 | return [self dequeue];
51 | }
52 |
53 | - (void)enqueue:(id)object
54 | {
55 | [self addObject:object];
56 | }
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/doc/fr/index.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | Ce plugin est destiné à faire en sorte que console.log() est aussi utile que possible. Il ajoute une fonction supplémentaire pour iOS, Ubuntu, Windows Phone 8 et Windows 8. Si vous êtes satisfait du fonctionnement de console.log() pour vous, alors vous avez probablement pas besoin ce plugin.
23 |
24 | ## Installation
25 |
26 | cordova plugin add org.apache.cordova.console
27 |
28 |
29 | ### Quirks Android
30 |
31 | Sur certaines plateformes autres que Android, console.log() va agir sur plusieurs arguments, tels que console.log ("1", "2", "3"). Toutefois, Android doit agir uniquement sur le premier argument. Les arguments suivants à console.log() seront ignorées. Ce plugin n'est pas la cause de cela, il s'agit d'une limitation d'Android lui-même.
--------------------------------------------------------------------------------
/iteration2/js/app.js:
--------------------------------------------------------------------------------
1 | var Header = React.createClass({
2 | render: function () {
3 | return (
4 |
57 | );
58 | }
59 | });
60 |
61 | React.render(
62 | ,
63 | document.body
64 | );
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/UIDevice+Extensions.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "UIDevice+Extensions.h"
22 |
23 | @implementation UIDevice (org_apache_cordova_UIDevice_Extension)
24 |
25 | - (NSString*)uniqueAppInstanceIdentifier
26 | {
27 | NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
28 | static NSString* UUID_KEY = @"CDVUUID";
29 |
30 | NSString* app_uuid = [userDefaults stringForKey:UUID_KEY];
31 |
32 | if (app_uuid == nil) {
33 | CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);
34 | CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef);
35 |
36 | app_uuid = [NSString stringWithString:(__bridge NSString*)uuidString];
37 | [userDefaults setObject:app_uuid forKey:UUID_KEY];
38 | [userDefaults synchronize];
39 |
40 | CFRelease(uuidString);
41 | CFRelease(uuidRef);
42 | }
43 |
44 | return app_uuid;
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVWebViewDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVAvailability.h"
22 |
23 | /**
24 | * Distinguishes top-level navigations from sub-frame navigations.
25 | * shouldStartLoadWithRequest is called for every request, but didStartLoad
26 | * and didFinishLoad is called only for top-level navigations.
27 | * Relevant bug: CB-2389
28 | */
29 | @interface CDVWebViewDelegate : NSObject {
30 | __weak NSObject * _delegate;
31 | NSInteger _loadCount;
32 | NSInteger _state;
33 | NSInteger _curLoadToken;
34 | NSInteger _loadStartPollCount;
35 | }
36 |
37 | - (id)initWithDelegate:(NSObject *)delegate;
38 | - (BOOL)request:(NSURLRequest*)newRequest isFragmentIdentifierToRequest:(NSURLRequest*)originalRequest CDV_DEPRECATED(3.5, "Use request:isEqualToRequestAfterStrippingFragments: instead.");
39 |
40 | - (BOOL)request:(NSURLRequest*)newRequest isEqualToRequestAfterStrippingFragments:(NSURLRequest*)originalRequest;
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/react-cordova/plugins/ios.json:
--------------------------------------------------------------------------------
1 | {
2 | "prepare_queue": {
3 | "installed": [],
4 | "uninstalled": []
5 | },
6 | "config_munge": {
7 | "files": {
8 | "config.xml": {
9 | "parents": {
10 | "/*": [
11 | {
12 | "xml": "",
13 | "count": 1
14 | },
15 | {
16 | "xml": "",
17 | "count": 1
18 | },
19 | {
20 | "xml": "",
21 | "count": 1
22 | },
23 | {
24 | "xml": "",
25 | "count": 1
26 | },
27 | {
28 | "xml": "",
29 | "count": 1
30 | }
31 | ]
32 | }
33 | }
34 | }
35 | },
36 | "installed_plugins": {
37 | "org.apache.cordova.statusbar": {
38 | "PACKAGE_NAME": "io.cordova.hellocordova"
39 | },
40 | "org.apache.cordova.console": {
41 | "PACKAGE_NAME": "io.cordova.hellocordova"
42 | },
43 | "org.apache.cordova.device": {
44 | "PACKAGE_NAME": "io.cordova.hellocordova"
45 | }
46 | },
47 | "dependent_plugins": {}
48 | }
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/doc/de/index.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # org.apache.cordova.console
21 |
22 | Dieses Plugin stellt sicher, dass der Befehl console.log() so hilfreich ist, wie er sein kann. Es fügt zusätzliche Funktion für iOS, Ubuntu, Windows Phone 8 und Windows 8 hinzu. Teilweise kann es vorkommen, dass der Befehl console.log() nicht korrekt erkannt wird, und es zu Fehlern bzw. zu nicht angezeigten Logs in der Console kommt. Wenn Sie mit der derzeitigen Funktionsweise zufrieden sind, kann es sein, dass Sie dieses Plugin nicht benötigen.
23 |
24 | ## Installation
25 |
26 | cordova plugin add org.apache.cordova.console
27 |
28 |
29 | ### Android Eigenarten
30 |
31 | Auf einigen anderen Plattformen als Android reagiert der Befehl console.log ("1", "2", "3") auf mehrere Befehle. In diesem Fall 1, 2 und 3. Android wird jedoch nur auf das erste Argument (1) reagieren. Nachfolgende Argumente zu console.log() (2 und 3) werden ignoriert. Dafür ist aber nicht dieses Plugin verantwortlich! Es ist eine Limitierung die von Android kommt und nicht von diesem Plugin beeinflusst werden kann.
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVLocalStorage.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVPlugin.h"
21 |
22 | #define kCDVLocalStorageErrorDomain @"kCDVLocalStorageErrorDomain"
23 | #define kCDVLocalStorageFileOperationError 1
24 |
25 | @interface CDVLocalStorage : CDVPlugin
26 |
27 | @property (nonatomic, readonly, strong) NSMutableArray* backupInfo;
28 |
29 | - (BOOL)shouldBackup;
30 | - (BOOL)shouldRestore;
31 | - (void)backup:(CDVInvokedUrlCommand*)command;
32 | - (void)restore:(CDVInvokedUrlCommand*)command;
33 |
34 | + (void)__fixupDatabaseLocationsWithBackupType:(NSString*)backupType;
35 | // Visible for testing.
36 | + (BOOL)__verifyAndFixDatabaseLocationsWithAppPlistDict:(NSMutableDictionary*)appPlistDict
37 | bundlePath:(NSString*)bundlePath
38 | fileManager:(NSFileManager*)fileManager;
39 | @end
40 |
41 | @interface CDVBackupInfo : NSObject
42 |
43 | @property (nonatomic, copy) NSString* original;
44 | @property (nonatomic, copy) NSString* backup;
45 | @property (nonatomic, copy) NSString* label;
46 |
47 | - (BOOL)shouldBackup;
48 | - (BOOL)shouldRestore;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.statusbar/src/ios/CDVStatusBar.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import
22 |
23 | @interface CDVStatusBar : CDVPlugin {
24 | @protected
25 | BOOL _statusBarOverlaysWebView;
26 | UIView* _statusBarBackgroundView;
27 | BOOL _uiviewControllerBasedStatusBarAppearance;
28 | UIColor* _statusBarBackgroundColor;
29 | NSString* _eventsCallbackId;
30 | }
31 |
32 | @property (atomic, assign) BOOL statusBarOverlaysWebView;
33 |
34 | - (void) overlaysWebView:(CDVInvokedUrlCommand*)command;
35 |
36 | - (void) styleDefault:(CDVInvokedUrlCommand*)command;
37 | - (void) styleLightContent:(CDVInvokedUrlCommand*)command;
38 | - (void) styleBlackTranslucent:(CDVInvokedUrlCommand*)command;
39 | - (void) styleBlackOpaque:(CDVInvokedUrlCommand*)command;
40 |
41 | - (void) backgroundColorByName:(CDVInvokedUrlCommand*)command;
42 | - (void) backgroundColorByHexString:(CDVInvokedUrlCommand*)command;
43 |
44 | - (void) hide:(CDVInvokedUrlCommand*)command;
45 | - (void) show:(CDVInvokedUrlCommand*)command;
46 |
47 | - (void) _ready:(CDVInvokedUrlCommand*)command;
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/Plugins/org.apache.cordova.statusbar/CDVStatusBar.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import
22 |
23 | @interface CDVStatusBar : CDVPlugin {
24 | @protected
25 | BOOL _statusBarOverlaysWebView;
26 | UIView* _statusBarBackgroundView;
27 | BOOL _uiviewControllerBasedStatusBarAppearance;
28 | UIColor* _statusBarBackgroundColor;
29 | NSString* _eventsCallbackId;
30 | }
31 |
32 | @property (atomic, assign) BOOL statusBarOverlaysWebView;
33 |
34 | - (void) overlaysWebView:(CDVInvokedUrlCommand*)command;
35 |
36 | - (void) styleDefault:(CDVInvokedUrlCommand*)command;
37 | - (void) styleLightContent:(CDVInvokedUrlCommand*)command;
38 | - (void) styleBlackTranslucent:(CDVInvokedUrlCommand*)command;
39 | - (void) styleBlackOpaque:(CDVInvokedUrlCommand*)command;
40 |
41 | - (void) backgroundColorByName:(CDVInvokedUrlCommand*)command;
42 | - (void) backgroundColorByHexString:(CDVInvokedUrlCommand*)command;
43 |
44 | - (void) hide:(CDVInvokedUrlCommand*)command;
45 | - (void) show:(CDVInvokedUrlCommand*)command;
46 |
47 | - (void) _ready:(CDVInvokedUrlCommand*)command;
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.console/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.11",
3 | "name": "org.apache.cordova.console",
4 | "cordova_name": "Console",
5 | "description": "Cordova Console Plugin",
6 | "license": "Apache 2.0",
7 | "repo": "https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git",
8 | "issue": "https://issues.apache.org/jira/browse/CB/component/12320644",
9 | "keywords": [
10 | "cordova",
11 | "console"
12 | ],
13 | "platforms": [
14 | "ios",
15 | "ubuntu",
16 | "wp7",
17 | "wp8",
18 | "windows8"
19 | ],
20 | "engines": [],
21 | "englishdoc": "\n\n# org.apache.cordova.console\n\nThis plugin is meant to ensure that console.log() is as useful as it can be.\nIt adds additional function for iOS, Ubuntu, Windows Phone 8, and Windows 8. If\nyou are happy with how console.log() works for you, then you probably\ndon't need this plugin.\n\n## Installation\n\n cordova plugin add org.apache.cordova.console\n\n### Android Quirks\n\nOn some platforms other than Android, console.log() will act on multiple\narguments, such as console.log(\"1\", \"2\", \"3\"). However, Android will act only\non the first argument. Subsequent arguments to console.log() will be ignored.\nThis plugin is not the cause of that, it is a limitation of Android itself.\n"
22 | }
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/build:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 |
22 | #
23 | # compile and launch a Cordova/iOS project to the simulator
24 | #
25 |
26 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
27 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
28 | XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj )
29 | PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
30 |
31 | source "$CORDOVA_PATH/check_reqs"
32 |
33 | cd "$PROJECT_PATH"
34 |
35 | APP=build/$PROJECT_NAME.app
36 |
37 | CONFIGURATION=Debug
38 | EMULATOR=1
39 | DEVICE=0
40 | while [[ $# -gt 0 ]]; do
41 | case "$1" in
42 | --debug) ;;
43 | --release) CONFIGURATION=Release;;
44 | --device) EMULATOR=0;;
45 | --emulator) ;;
46 | *) echo "Unrecognized flag: $1"; exit 2;;
47 | esac
48 | shift
49 | done
50 |
51 | if (( $EMULATOR )); then
52 | exec xcodebuild -project "$PROJECT_NAME.xcodeproj" -arch i386 -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphonesimulator build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/emulator"
53 | else
54 | exec xcodebuild -xcconfig "$CORDOVA_PATH/build.xcconfig" -project "$PROJECT_NAME.xcodeproj" ARCHS="armv7 armv7s arm64" -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphoneos build VALID_ARCHS="armv7 armv7s arm64" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/device"
55 | fi
56 |
57 |
--------------------------------------------------------------------------------
/iteration3/js/app.js:
--------------------------------------------------------------------------------
1 | var Header = React.createClass({
2 | render: function () {
3 | return (
4 |
68 | );
69 | }
70 | });
71 |
72 | React.render(
73 | ,
74 | document.body
75 | );
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVCommandDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVAvailability.h"
21 | #import "CDVInvokedUrlCommand.h"
22 |
23 | @class CDVPlugin;
24 | @class CDVPluginResult;
25 | @class CDVWhitelist;
26 |
27 | @protocol CDVCommandDelegate
28 |
29 | @property (nonatomic, readonly) NSDictionary* settings;
30 |
31 | - (NSString*)pathForResource:(NSString*)resourcepath;
32 | - (id)getCommandInstance:(NSString*)pluginName;
33 |
34 | // Sends a plugin result to the JS. This is thread-safe.
35 | - (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId;
36 | // Evaluates the given JS. This is thread-safe.
37 | - (void)evalJs:(NSString*)js;
38 | // Can be used to evaluate JS right away instead of scheduling it on the run-loop.
39 | // This is required for dispatch resign and pause events, but should not be used
40 | // without reason. Without the run-loop delay, alerts used in JS callbacks may result
41 | // in dead-lock. This method must be called from the UI thread.
42 | - (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop;
43 | // Runs the given block on a background thread using a shared thread-pool.
44 | - (void)runInBackground:(void (^)())block;
45 | // Returns the User-Agent of the associated UIWebView.
46 | - (NSString*)userAgent;
47 | // Returns whether the given URL passes the white-list.
48 | - (BOOL)URLIsWhitelisted:(NSURL*)url;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/iteration8/js/pageslider-react.js:
--------------------------------------------------------------------------------
1 | var PageSlider = {
2 | getInitialState: function () {
3 | return {
4 | history: [],
5 | pages: [],
6 | animating: false
7 | }
8 | },
9 | componentDidUpdate: function() {
10 | var skippedCurrentFrame = false,
11 | pageEl = this.getDOMNode().lastChild,
12 | pages = this.state.pages,
13 | l = pages.length,
14 | transitionEndHandler = function() {
15 | pageEl.removeEventListener('webkitTransitionEnd', transitionEndHandler);
16 | pages.shift();
17 | this.setState({pages: pages});
18 | }.bind(this),
19 | animate = function() {
20 | if (!skippedCurrentFrame) {
21 | skippedCurrentFrame = true;
22 | requestAnimationFrame(animate.bind(this));
23 | } else if (l > 0) {
24 | pages[l - 1].props.position = "center transition";
25 | this.setState({pages: pages, animating: false});
26 | pageEl.addEventListener('webkitTransitionEnd', transitionEndHandler);
27 | }
28 | };
29 |
30 | if (this.state.animating) {
31 | requestAnimationFrame(animate.bind(this));
32 | }
33 | },
34 | slidePage: function (page) {
35 | var history = this.state.history,
36 | pages = this.state.pages,
37 | l = history.length,
38 | hash = window.location.hash,
39 | position = "center";
40 |
41 | if (l === 0) {
42 | history.push(hash);
43 | } else if (hash === history[l - 2]) {
44 | history.pop();
45 | position = "left";
46 | } else {
47 | history.push(hash);
48 | position = "right";
49 | }
50 |
51 | page.props.position = position;
52 | pages.push(page);
53 |
54 | this.setState({history: history, pages: pages, animating: position!=="center"});
55 |
56 | },
57 | render: function () {
58 | return (
59 |
60 | {this.state.pages}
61 |
62 | );
63 | }
64 | };
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVInvokedUrlCommand.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface CDVInvokedUrlCommand : NSObject {
23 | NSString* _callbackId;
24 | NSString* _className;
25 | NSString* _methodName;
26 | NSArray* _arguments;
27 | }
28 |
29 | @property (nonatomic, readonly) NSArray* arguments;
30 | @property (nonatomic, readonly) NSString* callbackId;
31 | @property (nonatomic, readonly) NSString* className;
32 | @property (nonatomic, readonly) NSString* methodName;
33 |
34 | + (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry;
35 |
36 | - (id)initWithArguments:(NSArray*)arguments
37 | callbackId:(NSString*)callbackId
38 | className:(NSString*)className
39 | methodName:(NSString*)methodName;
40 |
41 | - (id)initFromJson:(NSArray*)jsonEntry;
42 |
43 | // Returns the argument at the given index.
44 | // If index >= the number of arguments, returns nil.
45 | // If the argument at the given index is NSNull, returns nil.
46 | - (id)argumentAtIndex:(NSUInteger)index;
47 | // Same as above, but returns defaultValue instead of nil.
48 | - (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue;
49 | // Same as above, but returns defaultValue instead of nil, and if the argument is not of the expected class, returns defaultValue
50 | - (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass;
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/react-cordova/www/js/pageslider-react.js:
--------------------------------------------------------------------------------
1 | var PageSlider = {
2 | getInitialState: function () {
3 | return {
4 | history: [],
5 | pages: [],
6 | animating: false
7 | }
8 | },
9 | componentDidUpdate: function() {
10 | var skippedCurrentFrame = false,
11 | pageEl = this.getDOMNode().lastChild,
12 | pages = this.state.pages,
13 | l = pages.length,
14 | transitionEndHandler = function() {
15 | pageEl.removeEventListener('webkitTransitionEnd', transitionEndHandler);
16 | pages.shift();
17 | this.setState({pages: pages});
18 | }.bind(this),
19 | animate = function() {
20 | if (!skippedCurrentFrame) {
21 | skippedCurrentFrame = true;
22 | requestAnimationFrame(animate.bind(this));
23 | } else if (l > 0) {
24 | pages[l - 1].props.position = "center transition";
25 | this.setState({pages: pages, animating: false});
26 | pageEl.addEventListener('webkitTransitionEnd', transitionEndHandler);
27 | }
28 | };
29 |
30 | if (this.state.animating) {
31 | requestAnimationFrame(animate.bind(this));
32 | }
33 | },
34 | slidePage: function (page) {
35 | var history = this.state.history,
36 | pages = this.state.pages,
37 | l = history.length,
38 | hash = window.location.hash,
39 | position = "center";
40 |
41 | if (l === 0) {
42 | history.push(hash);
43 | } else if (hash === history[l - 2]) {
44 | history.pop();
45 | position = "left";
46 | } else {
47 | history.push(hash);
48 | position = "right";
49 | }
50 |
51 | page.props.position = position;
52 | pages.push(page);
53 |
54 | this.setState({history: history, pages: pages, animating: position!=="center"});
55 |
56 | },
57 | render: function () {
58 | return (
59 |
60 | {this.state.pages}
61 |
62 | );
63 | }
64 | };
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/lib/install-device:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 | # Valid values for "--target" (case insensitive):
21 | # "iPhone (Retina 3.5-inch)" (default)
22 | # "iPhone (Retina 4-inch)"
23 | # "iPhone"
24 | # "iPad"
25 | # "iPad (Retina)"
26 |
27 | LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P)
28 | CORDOVA_PATH="$(dirname "$LIB_PATH")"
29 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
30 | XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj )
31 | PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
32 |
33 | DEVICE_APP_PATH="$PROJECT_PATH/build/device/$PROJECT_NAME.app"
34 |
35 | source "$CORDOVA_PATH/check_reqs"
36 |
37 | if [ ! -d "$DEVICE_APP_PATH" ]; then
38 | echo "Project '$DEVIC_APP_PATH' is not built."
39 | exit 1
40 | fi
41 |
42 |
43 | IOS_DEPLOY_MIN_VERSION="1.0.4"
44 | IOS_DEPLOY_LOCATION=$(which ios-deploy)
45 | if [ $? != 0 ]; then
46 | echo -e "\033[31mError: ios-deploy was not found. Please download, build and install version $IOS_DEPLOY_MIN_VERSION or greater from https://github.com/phonegap/ios-deploy into your path. Or 'npm install -g ios-deploy' using node.js: http://nodejs.org/\033[m"; exit 1;
47 | exit 1
48 | fi
49 |
50 | IOS_DEPLOY_VERSION=$(ios-deploy --version)
51 | if [[ "$IOS_DEPLOY_VERSION" < "$IOS_DEPLOY_MIN_VERSION" ]]; then
52 | echo "Cordova needs ios-deploy version $IOS_DEPLOY_MIN_VERSION or greater, you have version $IOS_DEPLOY_VERSION."
53 | exit 1
54 | fi
55 |
56 | # if we got here, we can deploy the app, then exit success
57 | ios-deploy -b "$DEVICE_APP_PATH"
58 | exit 0
59 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/HelloCordova/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | HelloCordova
34 |
35 | A sample Apache Cordova application that responds to the deviceready event.
36 |
37 |
38 | Apache Cordova Team
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/cordova/emulate:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 |
21 | SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'`
22 |
23 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
24 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
25 | XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj )
26 | PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
27 |
28 | source "$CORDOVA_PATH/check_reqs"
29 |
30 | APP_PATH=${1:-$PROJECT_PATH/build/emulator/$(xcodebuild -project "$PROJECT_PATH/$PROJECT_NAME.xcodeproj" -arch i386 -target "$PROJECT_NAME" -configuration Debug -sdk $SDK -showBuildSettings | grep FULL_PRODUCT_NAME | awk -F ' = ' '{print $2}')}
31 |
32 | DEVICE_FAMILY=${2:-${DEVICE_FAMILY:-iphone}}
33 |
34 | IOS_SIM_MIN_VERSION="1.7"
35 | IOS_SIM_LOCATION=$(which ios-sim)
36 | if [ $? != 0 ]; then
37 | echo -e "\033[31mError: ios-sim was not found. Please download, build and install version $IOS_SIM_MIN_VERSION or greater from https://github.com/phonegap/ios-sim into your path. Or 'npm install -g ios-sim' using node.js: http://nodejs.org/\033[m" 1>&2;
38 | exit 1;
39 | fi
40 |
41 | IOS_SIM_VERSION=$(ios-sim --version)
42 |
43 | if [[ "$IOS_SIM_VERSION" < "$IOS_SIM_MIN_VERSION" ]]; then
44 | echo "Cordova needs ios-sim version $IOS_SIM_MIN_VERSION or greater, you have version $IOS_SIM_VERSION." 1>&2;
45 | exit 1
46 | fi
47 |
48 | if [ ! -d "$APP_PATH" ]; then
49 | echo "Project '$APP_PATH' is not built. Building."
50 | "$CORDOVA_PATH/build" || exit $?
51 | fi
52 |
53 | if [ ! -d "$APP_PATH" ]; then
54 | echo "$APP_PATH not found to emulate." 1>&2;
55 | exit 1
56 | fi
57 |
58 | # launch using ios-sim
59 | ios-sim launch "$APP_PATH" --family "$DEVICE_FAMILY" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" --exit
60 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.statusbar/RELEASENOTES.md:
--------------------------------------------------------------------------------
1 |
21 | # Release Notes
22 |
23 | ### 0.1.5 (Apr 17, 2014) (First release as a core Cordova Plugin)
24 | * CB-6316: Added README.md which point to the new location for docs
25 | * CB-6316: Added license header to the documentation. Added README.md which point to the new location for docs
26 | * CB-6316: Moved StatusBar plugin documentation to docs folder
27 | * CB-6314: [android] Add StatusBar.isVisible support to Android
28 | * CB-6460: Update license headers
29 |
30 | ### 0.1.6 (Jun 05, 2014)
31 | * CB-6783 - added StatusBarStyle config preference, updated docs (closes #9)
32 | * CB-6812 Add license
33 | * CB-6491 add CONTRIBUTING.md
34 | * CB-6264 minor formatting issue
35 | * Update docs with recent WP changes, remove 'clear' from the loist of named colors in documentation
36 | * CB-6513 - Statusbar plugin for Android is not compiling
37 |
38 | ### 0.1.7 (Aug 06, 2014)
39 | * Add LICENSE and NOTICE
40 | * Update statusbar.js
41 | * Update backgroundColorByHexString function
42 | * ios: Use a persistent callbackId instead of calling sendJs
43 | * CB-6626 ios: Add a JS event for tapping on statusbar
44 | * ios: Fix hide to adjust webview's frame only when status bar is not overlaying webview
45 | * CB-6127 Updated translations for docs
46 | * android: Fix StatusBar.initialize() not running on UI thread
47 |
48 | ### 0.1.8 (Sep 17, 2014)
49 | * CB-7549 [StatusBar][iOS 8] Landscape issue
50 | * CB-7486 Remove StatusBarBackgroundColor intial preference (black background) so background will be initially transparent
51 | * Renamed test dir, added nested plugin.xml
52 | * added documentation for manual tests, moved background color test below overlay test
53 | * CB-7195 ported statusbar tests to framework
54 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.device/src/blackberry10/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | *
20 | */
21 |
22 | function getModelName () {
23 | var modelName = window.qnx.webplatform.device.modelName;
24 | //Pre 10.2 (meaning Z10 or Q10)
25 | if (typeof modelName === "undefined") {
26 | if (window.screen.height === 720 && window.screen.width === 720) {
27 | if ( window.matchMedia("(-blackberry-display-technology: -blackberry-display-oled)").matches) {
28 | modelName = "Q10";
29 | } else {
30 | modelName = "Q5";
31 | }
32 | } else if ((window.screen.height === 1280 && window.screen.width === 768) ||
33 | (window.screen.height === 768 && window.screen.width === 1280)) {
34 | modelName = "Z10";
35 | } else {
36 | modelName = window.qnx.webplatform.deviceName;
37 | }
38 | }
39 |
40 | return modelName;
41 | }
42 |
43 | function getUUID () {
44 | var uuid = "";
45 | try {
46 | //Must surround by try catch because this will throw if the app is missing permissions
47 | uuid = window.qnx.webplatform.device.devicePin;
48 | } catch (e) {
49 | //DO Nothing
50 | }
51 | return uuid;
52 | }
53 |
54 | module.exports = {
55 | getDeviceInfo: function (success, fail, args, env) {
56 | var result = new PluginResult(args, env),
57 | modelName = getModelName(),
58 | uuid = getUUID(),
59 | info = {
60 | platform: "blackberry10",
61 | version: window.qnx.webplatform.device.scmBundle,
62 | model: modelName,
63 | uuid: uuid
64 | };
65 |
66 | result.ok(info);
67 | }
68 | };
69 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.device/src/browser/DeviceProxy.js:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | *
20 | */
21 | var browser = require('cordova/platform');
22 | var cordova = require('cordova');
23 |
24 | function getPlatform() {
25 | return navigator.platform;
26 | }
27 |
28 | function getModel() {
29 | return getBrowserInfo(true);
30 | }
31 |
32 | function getVersion() {
33 | return getBrowserInfo(false);
34 | }
35 |
36 | function getBrowserInfo(getModel) {
37 | var userAgent = navigator.userAgent;
38 | var returnVal;
39 |
40 | if ((offset = userAgent.indexOf('Chrome')) !== -1) {
41 | returnVal = (getModel) ? 'Chrome' : userAgent.substring(offset + 7);
42 | } else if ((offset = userAgent.indexOf('Safari')) !== -1) {
43 | if (getModel) {
44 | returnVal = 'Safari';
45 | } else {
46 | returnVal = userAgent.substring(offset + 7);
47 |
48 | if ((offset = userAgent.indexOf('Version')) !== -1) {
49 | returnVal = userAgent.substring(offset + 8);
50 | }
51 | }
52 | } else if ((offset = userAgent.indexOf('Firefox')) !== -1) {
53 | returnVal = (getModel) ? 'Firefox' : userAgent.substring(offset + 8);
54 | }
55 |
56 | if ((offset = returnVal.indexOf(';')) !== -1 || (offset = returnVal.indexOf(' ')) !== -1) {
57 | returnVal = returnVal.substring(0, offset);
58 | }
59 |
60 | return returnVal;
61 | }
62 |
63 |
64 | module.exports = {
65 | getDeviceInfo: function (success, error) {
66 | setTimeout(function () {
67 | success({
68 | cordova: browser.cordovaVersion,
69 | platform: getPlatform(),
70 | model: getModel(),
71 | version: getVersion(),
72 | uuid: null
73 | });
74 | }, 0);
75 | }
76 | };
77 |
78 | require("cordova/exec/proxy").add("Device", module.exports);
79 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVJSON.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVJSON.h"
21 | #import
22 |
23 | @implementation NSArray (CDVJSONSerializing)
24 |
25 | - (NSString*)JSONString
26 | {
27 | NSError* error = nil;
28 | NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
29 | options:NSJSONWritingPrettyPrinted
30 | error:&error];
31 |
32 | if (error != nil) {
33 | NSLog(@"NSArray JSONString error: %@", [error localizedDescription]);
34 | return nil;
35 | } else {
36 | return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
37 | }
38 | }
39 |
40 | @end
41 |
42 | @implementation NSDictionary (CDVJSONSerializing)
43 |
44 | - (NSString*)JSONString
45 | {
46 | NSError* error = nil;
47 | NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
48 | options:NSJSONWritingPrettyPrinted
49 | error:&error];
50 |
51 | if (error != nil) {
52 | NSLog(@"NSDictionary JSONString error: %@", [error localizedDescription]);
53 | return nil;
54 | } else {
55 | return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
56 | }
57 | }
58 |
59 | @end
60 |
61 | @implementation NSString (CDVJSONSerializing)
62 |
63 | - (id)JSONObject
64 | {
65 | NSError* error = nil;
66 | id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
67 | options:NSJSONReadingMutableContainers
68 | error:&error];
69 |
70 | if (error != nil) {
71 | NSLog(@"NSString JSONObject error: %@", [error localizedDescription]);
72 | }
73 |
74 | return object;
75 | }
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/react-cordova/platforms/ios/CordovaLib/Classes/CDVPlugin.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import
22 | #import "CDVPluginResult.h"
23 | #import "NSMutableArray+QueueAdditions.h"
24 | #import "CDVCommandDelegate.h"
25 |
26 | extern NSString* const CDVPageDidLoadNotification;
27 | extern NSString* const CDVPluginHandleOpenURLNotification;
28 | extern NSString* const CDVPluginResetNotification;
29 | extern NSString* const CDVLocalNotification;
30 | extern NSString* const CDVRemoteNotification;
31 | extern NSString* const CDVRemoteNotificationError;
32 |
33 | @interface CDVPlugin : NSObject {}
34 |
35 | @property (nonatomic, weak) UIWebView* webView;
36 | @property (nonatomic, weak) UIViewController* viewController;
37 | @property (nonatomic, weak) id commandDelegate;
38 |
39 | @property (readonly, assign) BOOL hasPendingOperation;
40 |
41 | - (CDVPlugin*)initWithWebView:(UIWebView*)theWebView;
42 | - (void)pluginInitialize;
43 |
44 | - (void)handleOpenURL:(NSNotification*)notification;
45 | - (void)onAppTerminate;
46 | - (void)onMemoryWarning;
47 | - (void)onReset;
48 | - (void)dispose;
49 |
50 | /*
51 | // see initWithWebView implementation
52 | - (void) onPause {}
53 | - (void) onResume {}
54 | - (void) onOrientationWillChange {}
55 | - (void) onOrientationDidChange {}
56 | - (void)didReceiveLocalNotification:(NSNotification *)notification;
57 | */
58 |
59 | - (id)appDelegate;
60 |
61 | - (NSString*)writeJavascript:(NSString*)javascript CDV_DEPRECATED(3.6, "Use the CDVCommandDelegate equivalent of evalJs:. This will be removed in 4.0.0");
62 |
63 | - (NSString*)success:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId CDV_DEPRECATED(3.6, "Use the CDVCommandDelegate equivalent of sendPluginResult:callbackId. This will be removed in 4.0.0");
64 |
65 | - (NSString*)error:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId CDV_DEPRECATED(3.6, "Use the CDVCommandDelegate equivalent of sendPluginResult:callbackId. This will be removed in 4.0.0");
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/react-cordova/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | *
20 | */
21 | //example UA String for Firefox OS
22 | //Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0
23 | var firefoxos = require('cordova/platform');
24 | var cordova = require('cordova');
25 |
26 | //UA parsing not recommended but currently this is the only way to get the Firefox OS version
27 | //https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference
28 |
29 | //Should be replaced when better conversion to Firefox OS Version is available
30 | function convertVersionNumber(ver) {
31 | var hashVersion = {
32 | '18.0': '1.0.1',
33 | '18.1': '1.1',
34 | '26.0': '1.2',
35 | '28.0': '1.3',
36 | '30.0': '1.4',
37 | '32.0': '2.0'
38 | };
39 | var rver = ver;
40 | var sStr = ver.substring(0, 4);
41 | if (hashVersion[sStr]) {
42 | rver = hashVersion[sStr];
43 | }
44 | return (rver);
45 |
46 | }
47 | function getVersion() {
48 | if (navigator.userAgent.match(/(mobile|tablet)/i)) {
49 | var ffVersionArray = (navigator.userAgent.match(/Firefox\/([\d]+\.[\w]?\.?[\w]+)/));
50 | if (ffVersionArray.length === 2) {
51 | return (convertVersionNumber(ffVersionArray[1]));
52 | }
53 | }
54 | return (null);
55 | }
56 |
57 | function getModel() {
58 | var uaArray = navigator.userAgent.split(/\s*[;)(]\s*/);
59 | if (navigator.userAgent.match(/(mobile|tablet)/i)) {
60 | if (uaArray.length === 5) {
61 | return (uaArray[2]);
62 | }
63 | }
64 | return (null);
65 | }
66 | module.exports = {
67 | getDeviceInfo: function (success, error) {
68 | setTimeout(function () {
69 | success({
70 | platform: 'firefoxos',
71 | model: getModel(),
72 | version: getVersion(),
73 | uuid: null
74 | });
75 | }, 0);
76 | }
77 | };
78 |
79 | require("cordova/exec/proxy").add("Device", module.exports);
80 |
--------------------------------------------------------------------------------